From 2c837a6adbbdbb5f062e1ad86c98738084d31fb2 Mon Sep 17 00:00:00 2001 From: PliablePixels Date: Fri, 26 Jun 2015 20:25:01 -0400 Subject: Added uglify/minify as part of build process (Note: console log is enabled - remember to disable it in release mode) --- gulpfile.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'gulpfile.js') diff --git a/gulpfile.js b/gulpfile.js index 3efdfc0a..3a2770d3 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -6,9 +6,11 @@ var sass = require('gulp-sass'); var minifyCss = require('gulp-minify-css'); var rename = require('gulp-rename'); var sh = require('shelljs'); +var templateCache = require('gulp-angular-templatecache'); var paths = { - sass: ['./scss/**/*.scss'] + sass: ['./scss/**/*.scss'], +templatecache: ['./www/templates/**/*.html'] }; gulp.task('default', ['sass']); @@ -50,3 +52,17 @@ gulp.task('git-check', function(done) { } done(); }); + +gulp.task('templatecache', function (done) { + gulp.src('./www/templates/**/*.html') + .pipe(templateCache({standalone:true})) + .pipe(gulp.dest('./www/js')) + .on('end', done); + }); + + gulp.task('default', ['sass', 'templatecache']); + + gulp.task('watch', function() { + gulp.watch(paths.sass, ['sass']); + gulp.watch(paths.templatecache, ['templatecache']); + }); -- cgit v1.2.3