From 4445fce04b1ba8bcc22245940467df691cc6bbe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vesa=20Poikaj=C3=A4rvi?= Date: Fri, 24 Oct 2014 10:49:19 +0700 Subject: [PATCH] Add auto: false to livereload calls so build works Build worked when env was production but jammed if it was not because of the livereload server being up and running. That can be prevented by using option auto: false, but this introduces an issue where the livereload server is not started at all if auto: false call gets executed first (and it would if the assets were built first). Thus, start the watch task first. --- gulpfile.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gulpfile.coffee b/gulpfile.coffee index 31a70a6..46e7c46 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -61,7 +61,7 @@ gulp.task 'templates', -> .on 'error', handleError .pipe gulp.dest paths.templates.destination - pipeline = pipeline.pipe livereload() unless production + pipeline = pipeline.pipe livereload(auto: false) unless production pipeline @@ -76,7 +76,7 @@ gulp.task 'styles', -> styles = styles.pipe(CSSmin()) if production styles = styles.pipe gulp.dest paths.styles.destination - styles = styles.pipe livereload() unless production + styles = styles.pipe livereload(auto: false) unless production styles gulp.task 'assets', -> @@ -120,4 +120,4 @@ 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'] +gulp.task 'default', ['watch', 'no-js', 'server']