diff --git a/app/templates/_package.json b/app/templates/_package.json index 0c585d84..0fd87b3a 100644 --- a/app/templates/_package.json +++ b/app/templates/_package.json @@ -12,7 +12,7 @@ "del": "~1.2.0", "lodash": "~3.9.3", "gulp-minify-css": "~1.2.0", - "gulp-filter": "~2.0.2", + "gulp-filter": "~3.0.0", "gulp-flatten": "~0.0.4", <% if (imageMin) { -%> "gulp-imagemin": "~2.2.0", diff --git a/app/templates/gulp/_build.js b/app/templates/gulp/_build.js index 68027878..7d918a34 100644 --- a/app/templates/gulp/_build.js +++ b/app/templates/gulp/_build.js @@ -37,9 +37,9 @@ gulp.task('html', ['inject', 'partials'], function () { addRootSlash: false }; - var htmlFilter = $.filter('*.html'); - var jsFilter = $.filter('**/*.js'); - var cssFilter = $.filter('**/*.css'); + var htmlFilter = $.filter('*.html', { restore: true }); + var jsFilter = $.filter('**/*.js', { restore: true }); + var cssFilter = $.filter('**/*.css', { restore: true }); var assets; return gulp.src(path.join(conf.paths.tmp, '/serve/*.html')) @@ -51,7 +51,7 @@ gulp.task('html', ['inject', 'partials'], function () { .pipe($.ngAnnotate()) .pipe($.uglify({ preserveComments: $.uglifySaveLicense })).on('error', conf.errorHandler('Uglify')) .pipe($.sourcemaps.write('maps')) - .pipe(jsFilter.restore()) + .pipe(jsFilter.restore) .pipe(cssFilter) .pipe($.sourcemaps.init()) <% if (props.ui.key === 'bootstrap' && props.cssPreprocessor.extension === 'scss') { -%> @@ -63,7 +63,7 @@ gulp.task('html', ['inject', 'partials'], function () { <% } -%> .pipe($.minifyCss({ processImport: false })) .pipe($.sourcemaps.write('maps')) - .pipe(cssFilter.restore()) + .pipe(cssFilter.restore) .pipe(assets.restore()) .pipe($.useref()) .pipe($.revReplace()) @@ -74,7 +74,7 @@ gulp.task('html', ['inject', 'partials'], function () { quotes: true, conditionals: true })) - .pipe(htmlFilter.restore()) + .pipe(htmlFilter.restore) .pipe(gulp.dest(path.join(conf.paths.dist, '/'))) .pipe($.size({ title: path.join(conf.paths.dist, '/'), showFiles: true })); }); diff --git a/app/templates/gulp/_styles.js b/app/templates/gulp/_styles.js index 6dab7ad8..c2754937 100644 --- a/app/templates/gulp/_styles.js +++ b/app/templates/gulp/_styles.js @@ -41,7 +41,7 @@ gulp.task('styles', function () { }; <% if (props.cssPreprocessor.key === 'ruby-sass') { -%> - var cssFilter = $.filter('**/*.css'); + var cssFilter = $.filter('**/*.css', { restore: true }); <% } -%> return gulp.src([ @@ -65,7 +65,7 @@ gulp.task('styles', function () { .pipe($.autoprefixer()).on('error', conf.errorHandler('Autoprefixer')) .pipe($.sourcemaps.write()) <% if (props.cssPreprocessor.key === 'ruby-sass') { -%> - .pipe(cssFilter.restore()) + .pipe(cssFilter.restore) <% } -%> .pipe(gulp.dest(path.join(conf.paths.tmp, '/serve/app/'))) .pipe(browserSync.reload({ stream: true }));