From 264a95514a9b04a9c78d7caa05889894b56a9f6d Mon Sep 17 00:00:00 2001 From: Jeremy Englert Date: Sat, 13 Jan 2018 16:42:41 -0700 Subject: [PATCH 1/2] IMPROVE: Move clear-images-cache after images task --- gulpfile.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 3a779f7..57735ff 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -253,6 +253,16 @@ gulp.task( 'images', function() { .pipe( notify({ message: 'TASK: "images" Completed! 💯', onLast: true }) ); }); +/** + * Task: `clear-images-cache`. + * + * Deletes the images cache. By running the next "images" task, + * each image will be regenerated. + */ +gulp.task( 'clearCache', function( done ) { + return cache.clearAll( done ); +}); + /** * WP POT Translation File Generator. * @@ -285,16 +295,6 @@ gulp.task( 'translate', function() { ); }); -/** - * Task: `clear-images-cache`. - * - * Deletes the images cache. By running the next "images" task, - * each image will be regenerated. - */ -gulp.task( 'clearCache', function( done ) { - return cache.clearAll( done ); -}); - /** * Watch Tasks. * From f8a0e1db1579e9030f8b1de0e9334ff002942fef Mon Sep 17 00:00:00 2001 From: Jeremy Englert Date: Sat, 13 Jan 2018 16:44:39 -0700 Subject: [PATCH 2/2] NEW: Add nom scripts to remove global Gulp dependency --- package.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/package.json b/package.json index 89d7ac9..eb31db8 100644 --- a/package.json +++ b/package.json @@ -32,5 +32,15 @@ "gulp-uglify": "^3.0.0", "gulp-uglifycss": "^1.0.6", "gulp-wp-pot": "^2.0.7" + }, + "scripts": { + "postinstall": "npm run start", + "start": "gulp", + "styles": "gulp styles", + "vendorsJS": "gulp vendorsJS", + "customJS": "gulp customJS", + "images": "gulp images", + "clearCache": "gulp clearCache", + "translate": "gulp translate" } }