@rollup-extras/plugin-clean 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# Plugin Clean
|
|
2
2
|
|
|
3
|
-
Rollup plugin to clean a directory during build.
|
|
3
|
+
Rollup plugin to clean a directory during the build.
|
|
4
4
|
|
|
5
5
|
Points:
|
|
6
6
|
|
|
7
7
|
- Uses fs.rm to remove directories that shipped with nodejs and has built-in retries
|
|
8
8
|
- Can be used with no configuration
|
|
9
9
|
- Runs once per directory by default (good for watch mode)
|
|
10
|
-
-
|
|
10
|
+
- A minimal amount of logs by default
|
|
11
11
|
|
|
12
12
|
No globs support, please use [rollup-plugin-delete](https://github.com/vladshcherbin/rollup-plugin-delete) for globs.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
The plugin runs on `renderStart` per each output and uses output.dir as a default target.
|
|
15
15
|
|
|
16
16
|
Uses [`@niceties/logger`](https://github.com/kshutkin/niceties/blob/main/logger/README.md) to log messages, can be configured through `@niceties/logger` API.
|
|
17
17
|
|
|
@@ -42,7 +42,8 @@ export default {
|
|
|
42
42
|
}
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
To override
|
|
45
|
+
To override/provide target directory to clean use:
|
|
46
|
+
|
|
46
47
|
```javascript
|
|
47
48
|
clean('dir')
|
|
48
49
|
```
|
|
@@ -63,13 +64,13 @@ or
|
|
|
63
64
|
clean({targets: ['dir1', 'dir2']})
|
|
64
65
|
```
|
|
65
66
|
|
|
66
|
-
Other supported fields in options object: `pluginName`, `deleteOnce`, `outputPlugin` and `verbose`.
|
|
67
|
+
Other supported fields in the options object: `pluginName`, `deleteOnce`, `outputPlugin` and `verbose`.
|
|
67
68
|
|
|
68
69
|
`pluginName` is just for debugging purposes so you can understand which instance of the plugin is responsible for an error.
|
|
69
70
|
|
|
70
|
-
`deleteOnce` can be set to `false` if you want to clean the directory every rebuild.
|
|
71
|
+
`deleteOnce` can be set to `false` if you want to clean the directory for every rebuild.
|
|
71
72
|
|
|
72
|
-
`outputPlugin` can be set to `false` if you want plugin to trigger earlier (use with caution, you may want to define `targets` yourself in this mode)
|
|
73
|
+
`outputPlugin` can be set to `false` if you want the plugin to trigger earlier (use with caution, you may want to define `targets` yourself in this mode)
|
|
73
74
|
|
|
74
75
|
`verbose` is to get more messages in the console.
|
|
75
76
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.3.
|
|
2
|
+
"version": "1.3.6",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"name": "@rollup-extras/plugin-clean",
|
|
5
5
|
"author": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@niceties/logger": "^1.1.4",
|
|
51
|
-
"@rollup-extras/utils": "^1.4.
|
|
51
|
+
"@rollup-extras/utils": "^1.4.2"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "pkgbld-internal",
|