Skip to content

Commit

Permalink
fix copy;
Browse files Browse the repository at this point in the history
  • Loading branch information
elbakerino committed Sep 28, 2020
1 parent b1fea0d commit 6e7529d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-amp-page",
"version": "0.2.0",
"version": "0.2.1",
"license": "MIT",
"homepage": "https://github.com/bemit/create-amp-page",
"main": "index.js",
Expand Down
8 changes: 4 additions & 4 deletions src/copyTask/copyTask.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const gulp = require('gulp')
function makeCopyTask({copyPaths, dist, browsersync}) {
const gulpCopy = require('gulp-copy')

function copyTasks(copyInfo) {
function makeCopyTasks(copyInfo) {
return function copy() {
return gulp
.src(copyInfo.src)
Expand All @@ -21,17 +21,17 @@ function makeCopyTask({copyPaths, dist, browsersync}) {
}
copies.forEach(copyOne => {
// todo: add something like "sync-the-files" instead of copy for watch
gulp.watch(copyOne.src, watchOptions, copyFactory(copyOne))
gulp.watch(copyOne.src, watchOptions, makeCopyTasks(copyOne))
})
}
},
build: copyPaths ?
[
Array.isArray(copyPaths) ?
copyPaths.map(copySingle => (
copyFactory(copySingle)
makeCopyTasks(copySingle)
)) :
copyFactory(copyPaths),
makeCopyTasks(copyPaths),
] :
[],
}
Expand Down

0 comments on commit 6e7529d

Please sign in to comment.