Skip to content

Instantly share code, notes, and snippets.

@AutoSponge
Created May 27, 2014 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AutoSponge/68d12a832c86ed317406 to your computer and use it in GitHub Desktop.
Save AutoSponge/68d12a832c86ed317406 to your computer and use it in GitHub Desktop.
gulp.task( 'browserify', function () {
return browserify( './src/js/main.js' )
.bundle()
.pipe( source( 'bundle.js' ) )
.pipe( gulp.dest( './src/js/' ) );
} );
//Output scripts to main.js
gulp.task( 'scripts', ['browserify'], function () {
return gulp.src( './src/js/bundle.js' )
.pipe( uglify() )
.pipe( rename( 'main.js' ) )
.pipe( gulp.dest( './src/build/' ) )
.pipe( livereload( server ) );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment