cleandir-webpack-plugin
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -0,0 +0,0 @@ const path = require("path"); |
{ | ||
"name": "cleandir-webpack-plugin", | ||
"version": "0.1.3", | ||
"descriptipon": "Webpack plugin to remove files/directories before or after the build", | ||
"version": "0.1.4", | ||
"descriptipon": "A webpack plugin to remove files/directories before or after the build", | ||
"keywords": [ | ||
@@ -30,4 +30,3 @@ "webpack", | ||
"jest": "^23.5.0", | ||
"rimraf": "^2.6.2", | ||
"webpack": "^4.17.1" | ||
"rimraf": "^2.6.2" | ||
}, | ||
@@ -34,0 +33,0 @@ "scripts": { |
@@ -13,3 +13,3 @@ <h1 align="center">cleandir-webpack-plugin</h1> | ||
This plugin allows you to delete files/directories before or after bundle compilation. | ||
Comparing to most popular cleanup plugin, `cleandir-webpack-plugin` provides you with ability to run plugin after files was written to output directory and ability to exclude files with glob patterns. | ||
Comparing to most popular cleanup plugin, `cleandir-webpack-plugin` provides you ability to run plugin after files was written to output directory and ability to exclude files with glob patterns. | ||
@@ -21,2 +21,24 @@ ## Installation | ||
## Example | ||
```javascript | ||
// webpack.conf.js | ||
const CleanDirWebpackPlugin = require("cleandir-webpack-plugin"); | ||
module.exports = { | ||
plugins: [ | ||
new CleanDirWebpackPlugin("dist/"), // removing whole dist dir | ||
new CleanDirWebpackPlugin([ | ||
"dist/css/*.js", // removing js generated by sass plugin | ||
"dist/some/directory/**", // and something else generated by build | ||
], | ||
{ | ||
stage: "after", | ||
exclude: "dist/some/directory/**.log", // excepting the *.log files | ||
silent: true, | ||
}, | ||
), | ||
], | ||
}; | ||
``` | ||
## Usage | ||
@@ -78,1 +100,13 @@ ```javascript | ||
``` | ||
## Tests | ||
```bash | ||
npm i | ||
npm run test | ||
``` | ||
## Coverage | ||
```bash | ||
npm i | ||
npm run test:coverage | ||
``` |
@@ -0,0 +0,0 @@ const fs = require("fs"); |
@@ -0,0 +0,0 @@ const os = require("os"); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
34245
3
110
0