From 96d609e24f6f146a1bda614ad741d33c31853d6c Mon Sep 17 00:00:00 2001 From: "Fedor A. Fetisov" Date: Sat, 30 Jan 2021 00:01:47 +0300 Subject: [PATCH] Switch go Gulp 4 for builds --- gulpfile.js | 14 ++++++-------- package.json | 8 ++++---- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 14b9170..cb5fc5d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -35,13 +35,13 @@ gulp.task('get-composer', function(callback) { }); // Install Composer dependencies -gulp.task('composer-install', ['get-composer'], function(callback) { +gulp.task('composer-install', gulp.series('get-composer', function(callback) { exec(config.phpBin + ' composer.phar install --no-dev', function(error, stdout, stderr) { callback(error ? stderr : null); }); -}); +})); -gulp.task('prepare-release', ['composer-install'], function() { +gulp.task('prepare-release', gulp.series('composer-install', function() { var version = require('./package.json').version; return eventStream.merge( @@ -51,14 +51,12 @@ gulp.task('prepare-release', ['composer-install'], function() { .pipe(tar('jabber-plugin-' + version + '.tar')) .pipe(gzip()) ) - .pipe(chmod(644)) + .pipe(chmod(0644)) .pipe(gulp.dest('release')); -}); +})); // Builds and packs plugins sources -gulp.task('default', ['prepare-release'], function() { - // The "default" task is just an alias for "prepare-release" task. -}); +gulp.task('default', gulp.series('prepare-release')); /** * Returns files stream with the plugin sources. diff --git a/package.json b/package.json index af74fde..c1dfb65 100644 --- a/package.json +++ b/package.json @@ -2,17 +2,17 @@ "version": "0.0.1", "devDependencies": { "event-stream": "~3.1.7", - "gulp": "^3.9.1", - "gulp-chmod": "~1.2.0", + "gulp": "^4.0.0", + "gulp-chmod": "~3.0.0", "gulp-composer": "*", "gulp-gzip": "~0.0.8", "gulp-rename": "~1.2.0", - "gulp-tar": "~1.3.1", + "gulp-tar": "~3.1.0", "gulp-util": "*", "gulp-zip": "~2.0.2" }, "dependencies": { - "gulp": "^3.9.1", + "gulp": "^4.0.0", "graceful-fs": "^4.1.11" } }