You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@taskr/clear

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@taskr/clear

Remove one or multiple directories

1.1.0
latest
Source
npm
Version published
Weekly downloads
12K
-16.02%
Maintainers
1
Weekly downloads
 
Created
Source

@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

Keywords

taskr

FAQs

Package last updated on 27 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts