Ensure Gulp tasks run sequentially

So that images are always copied into place before trying to build the
SASS.
This commit is contained in:
Chris Hill-Scott
2019-02-06 16:09:39 +00:00
parent 8f6c6e08e4
commit 06a9e56589
2 changed files with 20 additions and 14 deletions

View File

@@ -8,6 +8,7 @@
import gulp from 'gulp'; import gulp from 'gulp';
import loadPlugins from 'gulp-load-plugins'; import loadPlugins from 'gulp-load-plugins';
import stylish from 'jshint-stylish'; import stylish from 'jshint-stylish';
import runSequence from 'run-sequence';
const plugins = loadPlugins(), const plugins = loadPlugins(),
@@ -156,19 +157,23 @@ gulp.task('lint',
); );
// Default: compile everything // Default: compile everything
gulp.task('default', gulp.task('default', function() {
[ runSequence(
'copy:govuk_template:template', [
'copy:govuk_template:images', 'copy:govuk_template:template',
'copy:govuk_template:fonts', 'copy:govuk_template:images',
'copy:govuk_template:css', 'copy:govuk_template:fonts',
'copy:govuk_template:js', 'copy:govuk_template:css',
'copy:govuk_template:error_page', 'copy:govuk_template:js',
'images', 'images',
'javascripts', ],
'sass' [
] 'copy:govuk_template:error_page',
); 'javascripts',
'sass'
]
);
});
// Optional: recompile on changes // Optional: recompile on changes
gulp.task('watch', gulp.task('watch',

View File

@@ -44,6 +44,7 @@
"gulp-prettyerror": "1.2.1", "gulp-prettyerror": "1.2.1",
"gulp-sass-lint": "1.2.0", "gulp-sass-lint": "1.2.0",
"jshint": "2.9.5", "jshint": "2.9.5",
"jshint-stylish": "2.2.1" "jshint-stylish": "2.2.1",
"run-sequence": "^2.2.1"
} }
} }