Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thesharpieone/plop-pack-remove
Plop actions that provides the ability to remove individual and globs of files
https://github.com/thesharpieone/plop-pack-remove
hacktoberfest hacktoberfest2021 plop plop-generators plop-pack
Last synced: 3 months ago
JSON representation
Plop actions that provides the ability to remove individual and globs of files
- Host: GitHub
- URL: https://github.com/thesharpieone/plop-pack-remove
- Owner: TheSharpieOne
- Created: 2021-10-26T21:46:19.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-27T12:59:09.000Z (about 3 years ago)
- Last Synced: 2024-09-16T16:49:48.820Z (3 months ago)
- Topics: hacktoberfest, hacktoberfest2021, plop, plop-generators, plop-pack
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# plop-pack-remove
A plop action which allows you to remove individual files or many files (via glob pattern).
## Installation
```sh
yarn add plop-pack-remove
``````sh
npm i plop-pack-remove
```## Example
```javascript
module.exports = function(plop) {
// Loads the gitInit action type
plop.load('plop-pack-remove');plop.setGenerator('generate', {
prompts: [
// ...
],
actions: [{
type: 'remove',
path: 'some/file/path.txt',
force: true // Allow removal of files outside of the project root. Defaults to false
skipIfNonexistent: true // When true it will skip if the file does not exist. When false, it will throw an error. Defaults to false
},
{
type: 'removeMany',
path: 'some/directory/**',
},
{
type: 'removeMany',
path: ['some/directory/**', 'some/other/directory/**', '/tmp/outside/of/project/specific-file.txt'],
force: true // Allow removal of files outside of the project root. Defaults to false
}];
})
}
```