Skip to content

Commit

Permalink
IMPROVE: Remove Gulp Global Dependency by using NPM Scripts
Browse files Browse the repository at this point in the history
Merge pull request #83 from JeremyEnglert/npm-scripts
  • Loading branch information
Ahmad Awais ⚡️ authored Jan 14, 2018
2 parents 5f038f8 + f8a0e1d commit d194d35
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
20 changes: 10 additions & 10 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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.
*
Expand Down
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit d194d35

Please sign in to comment.