From 0068ab857f559ddd0a8dfab225f473b9f54aabbe Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Fri, 21 Jun 2019 11:54:57 +0200 Subject: [PATCH] Fix #210: Issues with gulp4 --- gulpfile.js | 19 +++++++++++-------- package.json | 3 ++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 5799e3f..fe2099f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -163,15 +163,15 @@ gulp.task('locales', function() { gulp.task('watch', function() { debug = true; - var watcher = gulp.watch(paths.scripts, ['scripts']); + var watcher = gulp.watch(paths.scripts, gulp.series('scripts')); watcher.on('change', function(event) { if (event.type === 'deleted') { delete cached.caches.scripts[event.path]; remember.forget('scripts', event.path); } }); - gulp.watch(paths.styles, ['styles']); - gulp.watch(paths.layersConfig, ['layers_config']); + gulp.watch(paths.styles, gulp.series('styles')); + gulp.watch(paths.layersConfig, gulp.series('layers_config')); }); // Print paths to console, for manually debugging the gulp build @@ -203,11 +203,6 @@ gulp.task('inject', function() { .pipe(gulp.dest('.')); }); -gulp.task('debug', function() { - debug = true; - gulp.start('default'); -}); - var pkg = require('./package.json'); var tags = { patch: 'patch', minor: 'minor', major: 'major' }; var nextVersion; @@ -381,6 +376,14 @@ gulp.task( ) ); +gulp.task( + 'debug', + gulp.series(function(done) { + debug = true; + done(); + }, 'default') +); + gulp.task( 'release:zip', gulp.series('release:tag', 'default', function() { diff --git a/package.json b/package.json index c3748bc..8078f77 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "transifex-pull": "tx pull --all --minimum-perc 1 --force && (git add locales/*.json && git commit locales/*.json -m 'Update translations' || true)", "layers": "node layers/josm/extract.js && node layers/collection/extract.js", "test": "gulp", - "prettier": "prettier --write '**/*'" + "prettier": "prettier --write '**/*'", + "watch": "gulp && gulp watch" }, "husky": { "hooks": {