From c3351f4a8d97b02253aa7afb6c1a35f90dd7c7c2 Mon Sep 17 00:00:00 2001 From: ESadouski Date: Sat, 10 Dec 2016 16:06:07 +0300 Subject: [PATCH] fix(useref) - rollback useref to previous version --- gulp/build.js | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gulp/build.js b/gulp/build.js index 81c3e89..efbccfb 100644 --- a/gulp/build.js +++ b/gulp/build.js @@ -36,9 +36,11 @@ gulp.task('html', ['inject', 'partials'], function () { 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')) .pipe($.inject(partialsInjectFile, partialsInjectOptions)) + .pipe(assets = $.useref.assets()) .pipe($.rev()) .pipe(jsFilter) .pipe($.sourcemaps.init()) @@ -52,6 +54,7 @@ gulp.task('html', ['inject', 'partials'], function () { .pipe($.minifyCss({ processImport: false })) .pipe($.sourcemaps.write('maps')) .pipe(cssFilter.restore) + .pipe(assets.restore()) .pipe($.useref()) .pipe($.revReplace()) .pipe(htmlFilter) diff --git a/package.json b/package.json index fa8bf07..6d6f2e3 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "gulp-size": "~2.1.0", "gulp-sourcemaps": "~1.9.1", "gulp-uglify": "~2.0.0", - "gulp-useref": "~3.1.2", + "gulp-useref": "~1.3.0", "gulp-util": "~3.0.6", "gulp-zip": "^3.0.2", "http-proxy-middleware": "~0.17.2",