Skip to content

Commit

Permalink
Run styles and scripts in sequence
Browse files Browse the repository at this point in the history
Prevents potential race condition where styles and scripts write to the
manifest at the same time

ref roots#1398
  • Loading branch information
austinpray committed Mar 28, 2015
1 parent ae1463f commit b254f9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var browserSync = require('browser-sync');
var gulp = require('gulp');
var lazypipe = require('lazypipe');
var merge = require('merge-stream');
var runSequence = require('run-sequence');

// See https://github.com/austinpray/asset-builder
var manifest = require('asset-builder')('./assets/manifest.json');
Expand Down Expand Up @@ -236,7 +237,12 @@ gulp.task('watch', function() {
// ### Build
// `gulp build` - Run all the build tasks but don't clean up beforehand.
// Generally you should be running `gulp` instead of `gulp build`.
gulp.task('build', ['styles', 'scripts', 'fonts', 'images']);
gulp.task('build', function(callback) {
runSequence('styles',
'scripts',
['fonts', 'images'],
callback);
});

// ### Wiredep
// `gulp wiredep` - Automatically inject Less and Sass Bower dependencies. See
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"npm": ">=2.1.5"
},
"devDependencies": {
"pleeease": "3.2.0",
"asset-builder": "^1.0.2",
"browser-sync": "^2.4.0",
"del": "^1.1.1",
Expand All @@ -51,6 +50,8 @@
"jshint-stylish": "^1.0.1",
"lazypipe": "^0.2.2",
"merge-stream": "^0.1.7",
"pleeease": "3.2.0",
"run-sequence": "^1.0.2",
"traverse": "^0.6.6",
"wiredep": "^2.2.2",
"yargs": "^3.6.0"
Expand Down

0 comments on commit b254f9d

Please sign in to comment.