-
-
Save rlander/f9b8c86bbfd7c4530397 to your computer and use it in GitHub Desktop.
gulp + browserify + livescript recipe adapted from https://github.com/gulpjs/gulp/blob/master/docs/recipes/fast-browserify-builds-with-watchify.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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