Permalink
Browse files

Make `make watch` better

- Don't bail on errors
- Keep running watch if tests fail
  • Loading branch information...
koenbok committed Dec 27, 2015
1 parent aa5f73b commit cc17f249bec3b9843e1d82ebc665bde437b708c2
Showing with 9 additions and 3 deletions.
  1. +7 −2 gulpfile.coffee
  2. +2 −1 package.json
@@ -7,6 +7,7 @@ gulpWebpack = require("webpack-stream")
rename = require("gulp-rename")
template = require("gulp-template")
gutil = require("gulp-util")
plumber = require("gulp-plumber")
{exec} = require("child_process")
command = (cmd, cb) ->
@@ -20,6 +21,7 @@ CONFIG =
extensions: ["", ".web.coffee", ".web.js", ".coffee", ".js"]
cache: true
devtool: "sourcemap"
quiet: true
gulp.task "build-release", ["version"], ->
@@ -55,6 +57,7 @@ gulp.task "build-debug", ["version"], ->
debug: true
return gulp.src(config.entry)
.pipe(plumber())
.pipe(gulpWebpack(config))
.pipe(gulp.dest("build/"))
@@ -65,6 +68,7 @@ gulp.task "build-test", ->
output: {filename: "tests.js"}
return gulp.src(config.entry)
.pipe(plumber())
.pipe(gulpWebpack(config))
.pipe(gulp.dest("test/phantomjs/"))
@@ -73,8 +77,9 @@ gulp.task "test", ["build-debug", "build-test"], ->
.src("test/phantomjs/index.html")
.pipe(phantomjs({reporter:"dot"}))
gulp.task "watch", ["test"], ->
gulp.watch(["./*.coffee", "framer/**", "test/tests/**", "!Version.coffee"], ["test"])
gulp.task "watch", ->
gulp.run "test", ->
gulp.watch(["./*.coffee", "framer/**", "test/tests/**", "!Version.coffee"], ["test"])
gulp.task "watcher", ["version"], ->
@@ -38,7 +38,8 @@
"simulate": "^0.0.5",
"webpack": "^1.7.3",
"mocha": "^2.3.4",
"chai": "^3.4.1"
"chai": "^3.4.1",
"gulp-plumber": "^1.0.1"
},
"keywords": [
"prototyping"

0 comments on commit cc17f24

Please sign in to comment.