Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // views task: bundle all html templates into a templatecache (a big blob of html in a js file),
- // rename it app.templates.js and move it to ./src/js/config/
- gulp.task('views', function () {
- return (
- gulp
- // take all the html templates
- .src(viewFiles)
- // pipe them into a templatecache file
- .pipe(
- templateCache({
- standalone: true,
- })
- )
- // if there are errors, print them
- .on('error', interceptErrors)
- // rename the file app.templates.js
- .pipe(rename('app.templates.js'))
- // move it to ./src/js/config/
- .pipe(gulp.dest('./src/js/config/'))
- );
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement