Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // build task: create distribution-ready code. run html to get index.html into ./build/, run browserify
- // to get all the JS and HTML templates into ./build/, then minify the JS+templates and move them into
- // ./dist/ along with index.html
- gulp.task('build', ['html', 'browserify'], function () {
- // pipe index.html to build folder
- var html = gulp.src('build/index.html').pipe(gulp.dest('./dist/'));
- // minify the bundled js and pipe to build folder
- var js = gulp.src('build/main.js').pipe(uglify()).pipe(gulp.dest('./dist/'));
- // return the merged streams
- return merge(html, js);
- });
Advertisement
Add Comment
Please, Sign In to add comment