Skip to content

Commit

Permalink
v9.0.1 – Fix for copy task (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleynolan authored Dec 11, 2019
1 parent 8beaea3 commit 9ca3203
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 19 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).


v9.0.1
------------------------------
*December 11, 2019*

## Fixed
- Copy issue where for some reason the `gulpif` package was incorrectly stopping all images being copied over when `gulp.dest` was run. Have split out the base copy and the docs copy streams so they don't impact one another.


v9.0.0
------------------------------
*November 12, 2019*
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@justeat/gulp-build-fozzie",
"version": "9.0.0",
"version": "9.0.1",
"description": "Gulp build tasks for use across Fozzie modules",
"main": "index.js",
"author": "Damian Mullins <[email protected]> (http://www.damianmullins.com)",
Expand Down
44 changes: 26 additions & 18 deletions tasks/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,21 @@ const copy = fileType => {
rev()
))

.pipe(gulp.dest(assetDist))
.pipe(gulp.dest(assetDist));

// output to docs assets folder
.pipe(gulpif(
config.docs.outputAssets,
gulp.dest(assetDocsDist)
));
// this docs copy is separate as the gulpif() was terminating the previous stream before all files had copied
if (config.docs.outputAssets) {
gulp.src(assetSrc)
.pipe(plumber(config.gulp.onError))

.pipe(gulpif(
asset.revision,
rev()
))

// output to docs assets folder
.pipe(gulp.dest(assetDocsDist));
}
} else {
gutil.log(gutil.colors.red.bold('Error copying file - path not defined'));
}
Expand Down Expand Up @@ -116,17 +124,17 @@ gulp.task('copy:assets', cb => {
verbose: config.importedAssets.verbose,
logger: gutil.log
})
.catch(config.gulp.onError)
.then(() => {
if (config.docs.outputAssets) {
copyAssets({
pkgSrcGlob: config.importedAssets.importedAssetsSrcGlob,
dest: pathBuilder.docsAssetsDistDir,
verbose: config.importedAssets.verbose,
logger: gutil.log
})
.catch(config.gulp.onError);
}
});
.catch(config.gulp.onError)
.then(() => {
if (config.docs.outputAssets) {
copyAssets({
pkgSrcGlob: config.importedAssets.importedAssetsSrcGlob,
dest: pathBuilder.docsAssetsDistDir,
verbose: config.importedAssets.verbose,
logger: gutil.log
})
.catch(config.gulp.onError);
}
});
cb();
});

0 comments on commit 9ca3203

Please sign in to comment.