mirror of
https://github.com/koodiklinikka/koodiklinikka.fi.git
synced 2026-02-12 02:51:48 +00:00
Pretty logging for rebundle
Log the start and stop of rebundling the same way Gulp does, looks pretty.
This commit is contained in:
@@ -12,6 +12,8 @@ uglify = require 'gulp-uglify'
|
||||
ecstatic = require 'ecstatic'
|
||||
livereload = require 'gulp-livereload'
|
||||
prefix = require 'gulp-autoprefixer'
|
||||
chalk = require 'chalk'
|
||||
prettyTime = require 'pretty-hrtime'
|
||||
|
||||
production = process.env.NODE_ENV is 'production'
|
||||
|
||||
@@ -105,6 +107,8 @@ gulp.task 'watch', ->
|
||||
fullPaths: true
|
||||
|
||||
bundle.on 'update', ->
|
||||
gutil.log "Starting '#{chalk.cyan 'rebundle'}'..."
|
||||
start = process.hrtime()
|
||||
build = bundle.bundle()
|
||||
.on 'error', handleError
|
||||
|
||||
@@ -113,6 +117,7 @@ gulp.task 'watch', ->
|
||||
build
|
||||
.pipe gulp.dest paths.scripts.destination
|
||||
.pipe(livereload())
|
||||
gutil.log "Finished '#{chalk.cyan 'rebundle'}' after #{chalk.magenta prettyTime process.hrtime start}"
|
||||
|
||||
.emit 'update'
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
"bower": "~1.3.5",
|
||||
"browserify": "~6.1.0",
|
||||
"browserify-shim": "~3.8.0",
|
||||
"chalk": "~0.5.1",
|
||||
"coffeeify": "~0.7.0",
|
||||
"deamdify": "^0.1.1",
|
||||
"debowerify": "~0.9.1",
|
||||
@@ -39,6 +40,7 @@
|
||||
"karma-chrome-launcher": "~0.1.4",
|
||||
"karma-coffee-preprocessor": "~0.2.1",
|
||||
"karma-jasmine": "~0.2.2",
|
||||
"pretty-hrtime": "~0.2.2",
|
||||
"vinyl-source-stream": "~1.0.0",
|
||||
"watchify": "~2.0.0"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user