Skip to content
This repository has been archived by the owner on Dec 17, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1 from Financial-Times/gulp4
Browse files Browse the repository at this point in the history
 Change gulp script to support gulp 4
  • Loading branch information
debugwand authored Dec 12, 2018
2 parents 981234a + e82b567 commit 1150cfb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 22 deletions.
31 changes: 11 additions & 20 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const del = require('del');
const runSequence = require('run-sequence');
const exec = require('child_process').exec;
const fork = require('child_process').fork;
const fs = require('fs');
Expand Down Expand Up @@ -42,9 +41,10 @@ module.exports = function(gulp, config) {
const buildFolder = config['build-folder'] || 'public/build';
const env = config.env === 'prod' ? 'prod' : 'test';

gulp.task('build-config-dir', function() {
gulp.task('build-config-dir', function(done) {
ensureDirectoryExistence('build_config/js/test.js');
ensureDirectoryExistence('build_config/scss/test.scss');
done();
});

gulp.task('fingerprint', function(callback) {
Expand Down Expand Up @@ -88,7 +88,7 @@ module.exports = function(gulp, config) {
del(['./bower_components'], callback);
});

gulp.task('bower-clean', ['bower-cache-clean', 'bower-folder-clean']);
gulp.task('bower-clean', gulp.series('bower-cache-clean', 'bower-folder-clean'));

gulp.task('clean-build', function(callback) {
del([buildFolder], callback);
Expand Down Expand Up @@ -130,24 +130,15 @@ module.exports = function(gulp, config) {
});
});

gulp.task('obt-build', buildTasks);

gulp.task('verify', ['obt-verify']);
gulp.task('build', function(callback) {
runSequence(
'clean-build',
'build-config-dir',
'fingerprint',
'assets-domain-config',
'obt-build',
callback
);
});
gulp.task('obt-build', gulp.series(...buildTasks));

gulp.task('obt', ['verify', 'build']);
gulp.task('default', function(callback) {
runSequence('bower-clean', 'bower-install', 'build', callback);
});
gulp.task('verify', gulp.series('obt-verify'));
gulp.task('build', gulp.series('clean-build', 'build-config-dir', 'fingerprint', 'assets-domain-config', 'obt-build'));


gulp.task('obt', gulp.series('verify', 'build'));

gulp.task('default', gulp.series('bower-clean', 'bower-install', 'build'));

gulp.task('watch', function() {
gulp.watch(['./assets/**'], ['obt-build']);
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"del": "^1.1.1",
"gulp-watch": "^5.0.0",
"origami-build-tools": "^7.0.0",
"request": "^2.69.0",
"run-sequence": "^1.0.2"
"request": "^2.69.0"
}
}

0 comments on commit 1150cfb

Please sign in to comment.