From da268e6480eed358d61acaad0a9a3a9f10619aa8 Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Wed, 22 Jul 2015 09:51:45 -0500 Subject: [PATCH] build before snapshot --- gulpfile.js | 20 +++++++++++++------- scripts/snapshot/snapshot.task.js | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 90e37fa27c..08e2ccc1a6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -53,7 +53,7 @@ var tscReporter = { } }; -gulp.task('clean.build', function() { +gulp.task('clean.build', function(done) { runSequence( 'clean', 'transpile', @@ -61,20 +61,24 @@ gulp.task('clean.build', function() { 'e2e', 'sass', 'fonts', - 'vendor'); + 'vendor', + done + ); }) -gulp.task('build', function() { +gulp.task('build', function(done) { runSequence( 'transpile', 'bundle.js', 'e2e', 'sass', 'fonts', - 'vendor'); + 'vendor', + done + ); }) -gulp.task('watch', function() { +gulp.task('watch', function(done) { runSequence( 'transpile', @@ -84,7 +88,6 @@ gulp.task('watch', function() { 'fonts', 'vendor', 'serve', - function() { watch( [ @@ -109,7 +112,10 @@ gulp.task('watch', function() { watch('ionic/**/*.scss', function() { gulp.start('sass'); }); - }) + + done(); + } + ); }); gulp.task('serve', function() { diff --git a/scripts/snapshot/snapshot.task.js b/scripts/snapshot/snapshot.task.js index b2641ea4be..22490d0d31 100644 --- a/scripts/snapshot/snapshot.task.js +++ b/scripts/snapshot/snapshot.task.js @@ -20,7 +20,7 @@ module.exports = function(gulp, argv, buildConfig) { console.log('Serving `dist` on http://localhost:' + buildConfig.protractorPort); }); - gulp.task('snapshot', ['e2e', 'protractor-server'], function(done) { + gulp.task('snapshot', ['clean.build', 'protractor-server'], function(done) { var protractorConfigFile = path.resolve(projectRoot, 'scripts/snapshot/protractor.config.js'); snapshot(done, protractorConfigFile); });