npm.io
0.1.0-alpha.13 • Published 6 years ago

@webscaffold/task-clean

Licence
MIT
Version
0.1.0-alpha.13
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Web Scaffold task-clean

@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