Advertisement
AllenYuan

build - browserify - 1

Apr 22nd, 2020
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. // views task: bundle all html templates into a templatecache (a big blob of html in a js file),
  2. // rename it app.templates.js and move it to ./src/js/config/
  3. gulp.task('views', function () {
  4. return (
  5. gulp
  6. // take all the html templates
  7. .src(viewFiles)
  8. // pipe them into a templatecache file
  9. .pipe(
  10. templateCache({
  11. standalone: true,
  12. })
  13. )
  14. // if there are errors, print them
  15. .on('error', interceptErrors)
  16. // rename the file app.templates.js
  17. .pipe(rename('app.templates.js'))
  18. // move it to ./src/js/config/
  19. .pipe(gulp.dest('./src/js/config/'))
  20. );
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement