@ilabdev/clean
v1.0.0
Published
Gulp tasks for cleaning files & directories
Downloads
1
Readme
@ilabdev/clean
Gulp tasks for cleaning files & directories
Installation & set up
Install @ilabdev/clean
npm install @ilabdev/clean --save-dev
-- OR --
yarn add @ilabdev/clean --dev
Include @ilabdev/clean
in your gulpfile.js
NOTE: Make sure you pass gulp
through to the package as shown below. The package sets up gulp tasks and will need it passed through to work.
require( '@ilabdev/clean' )( gulp )
Add the content from config.sample.js
to your .gulpconfig.js
and adjust as appropriate
module.exports = {
// Other configs here...
clean: {
process: true,
logColor: 'red',
paths: [
'./dist',
],
pipes: {
rimraf: {
glob: true,
},
},
},
// Other configs here...
}
Run gulp clean
to run the task, or add the task as a script and run that with npm
or yarn
Config
process
Type: boolean
Whether to clean files & directories or not
loggerColor
Type: string
The logger color to use for any output text. See https://github.com/stgdp/fancy-logger#available-modifiers for colors that can be used
paths
Type: string[]|string
The paths to remove. Passed through to gulp.src
, items can be globs
pipes
Type: object
Options to be passed through to the pipes
pipes.rimraf
Type: object
Options to be passed through to the rimraf
pipe. See https://www.npmjs.com/package/rimraf#rimraff-opts---promise for more information