Skip to content

Commit

Permalink
chore(gulp): minor refactor for watch + fixed double copying of dist …
Browse files Browse the repository at this point in the history
…when using `rebuild --rel`
  • Loading branch information
stephenlautier committed Jun 12, 2016
1 parent 51f1ef6 commit 5b96243
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
1 change: 0 additions & 1 deletion build/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ gulp.task("rebuild", (cb) => {
return runSeq(
"clean",
"build",
"copy-dist",
cb);
}
return runSeq(
Expand Down
23 changes: 12 additions & 11 deletions build/tasks/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@ const args = require("../args");
const config = require("../config");

gulp.task("watch", () => {
if (args.isRelease) {
// ts
gulp.watch([config.src.ts, `!${config.src.testTs}`], () => {

// ts
gulp.watch([config.src.ts, `!${config.src.testTs}`], () => {
if (args.isRelease) {
return runSeq(
"compile:ts",
"copy-dist"
);
}).on("change", reportChange)
.on("error", swallowError);
} else {
// ts
gulp.watch([config.src.ts, `!${config.src.testTs}`], ["compile:ts"])
.on("change", reportChange)
.on("error", swallowError);
}
} else {
return runSeq(
"compile:ts"
);
}
}).on("change", reportChange)
.on("error", swallowError);

});

function reportChange(event) {
Expand Down

0 comments on commit 5b96243

Please sign in to comment.