Skip to content

Instantly share code, notes, and snippets.

@rlander
Forked from raine/gulpfile.ls
Created November 9, 2015 20:50
Show Gist options
  • Select an option

  • Save rlander/f9b8c86bbfd7c4530397 to your computer and use it in GitHub Desktop.

Select an option

Save rlander/f9b8c86bbfd7c4530397 to your computer and use it in GitHub Desktop.
require! <[ watchify browserify gulp ]>
require! 'vinyl-source-stream': source
require! 'vinyl-buffer': buffer
require! 'gulp-util': gutil
require! 'liveify'
gulp.task \bundle !->
bundler = watchify browserify {} <<< watchify.args <<<
entries: ['./src/index.ls']
debug: true
transform: [liveify]
bundler.on \update, bundle
bundler.on \log, gutil.log
do function bundle
bundler.bundle!
.on \error, -> gutil.log "Browserify #it"
.pipe source \bundle.js
.pipe buffer!
.pipe gulp.dest './dist'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment