Update to latest deps and fix related code

Couple of related changes in one commit:

- Upgrade all dependencies to latest ones.

- Change how Browserify/Watchify is called since it has changed

- Added a task no-js that will not launch the 'scripts' task. This is
  because upon first run it would run simultaneously with Watchify and
  the outcome would not work.

- Be consistent with quotes
This commit is contained in:
Vesa Poikajärvi
2014-10-24 10:34:43 +07:00
parent ea2ef06874
commit 3199a0fa65
2 changed files with 24 additions and 16 deletions

View File

@@ -43,8 +43,9 @@ gulp.task 'scripts', ->
bundle = browserify
entries: [paths.scripts.source]
extensions: ['.coffee']
debug: not production
build = bundle.bundle(debug: not production)
build = bundle.bundle()
.on 'error', handleError
.pipe source paths.scripts.filename
@@ -88,19 +89,23 @@ gulp.task 'server', ->
.createServer ecstatic root: __dirname + '/public'
.listen 9001
gulp.task "watch", ->
gulp.task 'watch', ->
livereload.listen()
gulp.watch paths.templates.watch, ['templates']
gulp.watch paths.styles.watch, ['styles']
gulp.watch paths.assets.watch, ['assets']
bundle = watchify
bundle = watchify browserify
entries: [paths.scripts.source]
extensions: ['.coffee']
debug: not production
cache: {}
packageCache: {}
fullPaths: true
bundle.on 'update', ->
build = bundle.bundle(debug: not production)
build = bundle.bundle()
.on 'error', handleError
.pipe source paths.scripts.filename
@@ -111,5 +116,8 @@ gulp.task "watch", ->
.emit 'update'
gulp.task "build", ['scripts', 'templates', 'styles', 'assets']
gulp.task "default", ["build", "watch", "server"]
gulp.task 'no-js', ['templates', 'styles', 'assets']
gulp.task 'build', ['scripts', 'no-js']
# scripts and watch conflict and will produce invalid js upon first run
# which is why the no-js task exists.
gulp.task 'default', ['no-js', 'watch', 'server']