Skip to content

Commit 901df4e

Browse files
committed
Update readme with del package links and comments
1 parent 6543bd7 commit 901df4e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

readme.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Delete files and folders using Rollup.
44

55
## About
66

7-
This plugin is useful when you want to clean `dist` or other folders and files before bundling. It's using [del package](https://github.com/sindresorhus/del) inside, check it for pattern examples.
7+
This plugin is useful when you want to clean `dist` or other folders and files before bundling. It's using [del package](https://github.com/sindresorhus/del) inside, check it for [pattern examples](https://github.com/sindresorhus/del?tab=readme-ov-file#patterns) and [additional options](https://github.com/sindresorhus/del?tab=readme-ov-file#options).
88

99
## Installation
1010

@@ -31,7 +31,7 @@ export default {
3131
file: 'dist/app.js'
3232
},
3333
plugins: [
34-
del({ targets: 'dist/*' })
34+
del({ targets: 'dist' })
3535
]
3636
}
3737
```
@@ -45,14 +45,17 @@ There are some useful options:
4545
A string or an array of patterns of files and folders to be deleted. Default is `[]`.
4646

4747
```js
48+
// Folder
4849
del({
4950
targets: 'build'
5051
})
5152

53+
// Files
5254
del({
5355
targets: 'dist/*.js'
5456
})
5557

58+
// Multiple targets
5659
del({
5760
targets: ['dist/*', 'images/*.webp']
5861
})
@@ -62,15 +65,16 @@ del({
6265

6366
Output removed files and folders to console. Default is `false`.
6467

68+
> [!NOTE]
69+
> Use \* (wildcard character) in pattern to show removed files
70+
6571
```js
6672
del({
6773
targets: 'dist/*',
6874
verbose: true
6975
})
7076
```
7177

72-
> Note: use \* (wildcard character) in pattern to show removed files
73-
7478
#### hook
7579

7680
[Rollup hook](https://rollupjs.org/plugin-development/#build-hooks) the plugin should use. Default is `buildStart`.

0 commit comments

Comments
 (0)