Skip to content

Instantly share code, notes, and snippets.

@JohnAmican
Last active September 1, 2015 02:36
Show Gist options
  • Save JohnAmican/1b093312f270b5aee7de to your computer and use it in GitHub Desktop.
Save JohnAmican/1b093312f270b5aee7de to your computer and use it in GitHub Desktop.
bundle = (name, opts) ->
_.extend opts,
fullPaths: true
cache: {}
packageCache: {}
b = browserify opts
rebundle = ->
b.bundle()
.on 'error', (err) ->
console.log err.toString()
@emit 'end'
.pipe source name
.pipe buffer()
.pipe gulp.dest "your/dest"
rebundle()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment