https://github.com/olton/broccoli-clean
A broccoli plugin to clean specified directories
https://github.com/olton/broccoli-clean
broccoli broccoli-plugin clean clean-dir clean-directory javascript plugin
Last synced: 4 months ago
JSON representation
A broccoli plugin to clean specified directories
- Host: GitHub
- URL: https://github.com/olton/broccoli-clean
- Owner: olton
- License: mit
- Created: 2020-05-19T17:46:39.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-12T14:09:13.000Z (almost 4 years ago)
- Last Synced: 2025-10-23T04:04:57.237Z (7 months ago)
- Topics: broccoli, broccoli-plugin, clean, clean-dir, clean-directory, javascript, plugin
- Language: JavaScript
- Size: 371 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Broccoli Clean
[](https://travis-ci.org/olton/broccoli-clean)
Given an input node, the Broccoli Clean plugin clean a specified node.
You can specify multiple folders as an array.
## Documentation
### `clean(inputNode, options)`
`inputNode` *{Single node | Nodes array}*
A Broccoli node (formerly: "tree"). A node in Broccoli can be either a string
that references a directory in your project, or array of string of directories, or a node object returned from
running another Broccoli plugin.
If your project has the following file structure:
```shell
.
├── Brocfile.js
├── dist/
└── temp/
```
You can select a subsection of the tree via Clean:
```javascript
const clean = require('broccoli-clean');
const cleanDir = clean('dist');
```
or
```javascript
const clean = require('broccoli-clean');
const cleanDirs = clean(['dist', 'temp']);
```
Export node for Broccoli
```javascript
module.exports = cleanDir;
```
#### Options
`annotation` *{String}*
## Tests
Running the tests:
```bash
npm install
npm test
```
## License
This project a distributed under the MIT license.