Fix #210: Issues with gulp4

This commit is contained in:
Phyks (Lucas Verney) 2019-06-21 11:54:57 +02:00
parent ebfdd7129a
commit 0068ab857f
2 changed files with 13 additions and 9 deletions

View file

@ -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() {

View file

@ -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": {