From 9d1df21d915f28316de398c0c7fda0d27a90bbc1 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 5 May 2015 16:09:09 -0700 Subject: [PATCH] build(gulp): do no rebuild tools during test.unit.cjs This introduces private !build.js.cjs task that is to be executed only from other public tasks. --- gulpfile.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 0979e6eca8..d660a9a572 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -374,10 +374,10 @@ gulp.task('test.unit.cjs/ci', function(done) { }); -gulp.task('test.unit.cjs', ['build/clean.js'], function (done) { +gulp.task('test.unit.cjs', ['build/clean.js', 'build.tools'], function (done) { function buildAndTest() { runSequence( - 'build.js.cjs', + '!build.js.cjs', 'test.unit.cjs/ci' ); } @@ -554,9 +554,20 @@ gulp.task('build.js.prod', ['build.tools'], function() { }); +/** + * public task + */ +gulp.task('build.js.cjs', ['build.tools'], function(done) { + runSequence('!build.js.cjs', done); +}); + + var firstBuildJsCjs = true; -gulp.task('build.js.cjs', ['build.tools'], function() { +/** + * private task + */ +gulp.task('!build.js.cjs', function() { return angularBuilder.rebuildNodeTree().then(function() { if (firstBuildJsCjs) { firstBuildJsCjs = false;