openstack-health/gulp/tasks/production.js
Tim Buckley 8c056702e3 Fix race condition in gulp prod and dev tasks
This fixes a race condition in gulp tasks where the 'browserify' task
would occasionally run before the 'views' task had finished, causing
an exception to be thrown when it failed to find the generated
templates. This makes the 'browserify' task wait for all other tasks
to complete before running, so the templates will always be generated
first.

Change-Id: I17dd4cd234dc61b98ba9f0e5ab527d8798e28434
2016-04-21 10:47:35 -06:00

17 lines
301 B
JavaScript

'use strict';
var gulp = require('gulp');
var runSequence = require('run-sequence');
gulp.task('prod', ['clean'], function(cb) {
cb = cb || function() {};
global.isProd = true;
runSequence(
['styles', 'fonts', 'images', 'vendor-js', 'views'],
'browserify', 'gzip', cb);
});