From 1547cc3e60024b375ef6eda29557deb77b1426de Mon Sep 17 00:00:00 2001 From: sayali Date: Wed, 9 Dec 2020 19:29:14 -0800 Subject: [PATCH 1/2] Fixing duplicate task execution --- gulp/build.js | 8 ++++---- gulp/server.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gulp/build.js b/gulp/build.js index 653a1f1c..17419ea5 100644 --- a/gulp/build.js +++ b/gulp/build.js @@ -188,7 +188,7 @@ gulp.task('build:inject', gulp.series(['dev:styles', 'dev:scripts', 'build:ngvie return injectHtml(false); })); -gulp.task('build:html', gulp.series(['dev:styles', 'dev:scripts', 'build:ngviews', 'build:inject'], function () { +gulp.task('build:html', gulp.series('build:inject', function () { var jsFilter = filter(['**/*.js'], {'restore': true}); var cssFilter = filter(['**/*.css'], {'restore': true}); @@ -238,8 +238,8 @@ gulp.task('addUrlContextPath:revision', async function(){ }); gulp.task('addUrlContextPath:revreplace', gulp.series('addUrlContextPath:revision', function(){ - // var manifest = gulp.src("lemur/static/dist/rev-manifest.json"); - // var urlContextPathExists = argv.urlContextPath ? true : false; + var manifest = gulp.src("lemur/static/dist/rev-manifest.json"); + var urlContextPathExists = argv.urlContextPath ? true : false; return gulp.src( "lemur/static/dist/index.html") .pipe(gulp.dest('lemur/static/dist')); })); @@ -259,5 +259,5 @@ gulp.task('addUrlContextPath', gulp.series('addUrlContextPath:revreplace', async })); -gulp.task('build', gulp.series(['build:ngviews', 'build:inject', 'build:images', 'build:fonts', 'build:html', 'build:extras'])); +gulp.task('build', gulp.series(['build:images', 'build:fonts', 'build:html', 'build:extras'])); gulp.task('package', gulp.series(['addUrlContextPath', 'package:strip'])); diff --git a/gulp/server.js b/gulp/server.js index 804ca115..ccc29ac2 100644 --- a/gulp/server.js +++ b/gulp/server.js @@ -38,7 +38,7 @@ function browserSyncInit(baseDir, files, browser) { } -gulp.task('watch', gulp.series(['dev:styles', 'dev:scripts', 'dev:inject', 'dev:fonts'], function (done) { +gulp.task('watch', gulp.series(['dev:inject', 'dev:fonts'], function (done) { gulp.watch('app/styles/**/*.less', gulp.parallel('dev:styles')); gulp.watch('app/styles/**/*.css', gulp.parallel('dev:styles')); gulp.watch('app/**/*.js', gulp.parallel('dev:scripts')); From 785ef6adb58bdd8c051436ba67615740c1ccdb1d Mon Sep 17 00:00:00 2001 From: sayali Date: Wed, 9 Dec 2020 19:45:36 -0800 Subject: [PATCH 2/2] Uncommented rev-manifest: allowEmpty --- gulp/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulp/build.js b/gulp/build.js index 17419ea5..c864037a 100644 --- a/gulp/build.js +++ b/gulp/build.js @@ -238,7 +238,7 @@ gulp.task('addUrlContextPath:revision', async function(){ }); gulp.task('addUrlContextPath:revreplace', gulp.series('addUrlContextPath:revision', function(){ - var manifest = gulp.src("lemur/static/dist/rev-manifest.json"); + var manifest = gulp.src("lemur/static/dist/rev-manifest.json", { allowEmpty: true }); var urlContextPathExists = argv.urlContextPath ? true : false; return gulp.src( "lemur/static/dist/index.html") .pipe(gulp.dest('lemur/static/dist'));