mirror of
https://github.com/koodiklinikka/koodiklinikka.fi.git
synced 2026-01-26 11:23:58 +00:00
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.
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user