@taskr/clear
Remove one or multiple directories
Last updated 3 years ago by lukeed .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @taskr/clear 
SYNC missed versions from official npm registry.

@taskr/clear npm

Remove one or multiple directories

Install

$ npm install --save-dev @taskr/clear

Usage

exports.cleanup = function * (task) {
  // single file
  yield task.clear('foo.js');

  // single directory
  yield task.clear('dist');

  // multiple directories
  yield task.clear(['dist', 'build']);

  // glob pattern(s)
  yield task.clear(['dist/*.css', 'dist/js/*']);

  // mixed
  yield task.clear(['foo.js', 'build', 'dist/*.css']);

  // with options
  yield task.clear('dist', {maxBusyTries: 5});
}

API

task.clear(files, [options])

files

Type: string or array

A filepath, directory path, or glob pattern. For multiple paths, use an array.

options

Type: object
Default: {}

All options are passed directly to rimraf. Please see its documentation on options.

Support

Any issues or questions can be sent to the Taskr monorepo.

Please be sure to specify that you are using @taskr/clear.

License

MIT © Luke Edwards

Current Tags

  • 1.1.0                                ...           latest (3 years ago)

4 Versions

  • 1.1.0                                ...           3 years ago
  • 1.0.6                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 16
Last Day 0
Last Week 4
Last Month 21
Dependencies (2)
Dev Dependencies (1)
Dependents (3)

Copyright 2014 - 2016 © taobao.org |