mirror of
https://github.com/koodiklinikka/koodiklinikka.fi.git
synced 2026-03-17 16:05:01 +00:00
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:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user