@webscaffold/task-clean
v0.1.0-alpha.13
Published
@webscaffold clean task
Downloads
34
Readme
@web-scaffold/task-clean
WEB Scaffold
task for cleaning up folders and files.
Install
$ npm install --save-dev @webscaffold/task-clean
Usage
const clean = require('@webscaffold/task-clean');
await clean(['path_to_folder/*'], options);
This will clean all files from the folder.
The module uses rimraf internally so for more info on how you can define the paths check the modules options.
API
clean(paths, [options])
Returns a Promise for the paths to be removed. It will also log to the console the steps it took to do it.
paths
Type: array
Array of paths to be removed using rimraf
options.
options
Type: object
Options object that can be passed.
taskName
Type: string
Default: clean
Task name that will be used by the logger to namespace the logs.
taskColor
Type: string
Default: #F3FFBD
The color used by the logger to log to the console the task output.
Licensing
MIT © Radu Micu