gulp-query-clean
Clean for gulp-query
Delete files and folders
npm install gulp-query gulp-query-clean
Example
Paste the code into your gulpfile.js
and configure it
let build = require('gulp-query')
, clean = require('gulp-query-clean')
;
cocktail(function (query) {
query.plugins([clean])
.clean('cache/**/*','cache')
.clean(['public/css/admin.css/','css/undercover.css'])
.clean({
delete: [
'public/css/*.css',
'public/js/*.js',
'!public/js/jquery.js',
],
name: 'main'
})
;
});
And feel the freedom
gulp
gulp --production // For production
gulp clean // Only for clean
gulp clean:cache // Only for cache's task
gulp clean:admin clean:main watch // Watching change only for admin and main
...
Options
.clean({
name: "task_name",
delete: "clean/**/*",
})