Socket
Socket
Sign inDemoInstall

clean-webpack-plugin

Package Overview
Dependencies
10
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.1.3

4

index.js

@@ -5,5 +5,5 @@ var rimraf = require('rimraf')

function Plugin(paths) {
function Plugin(paths, context) {
// determine webpack root
this.context = path.dirname(module.parent.filename);
this.context = context || path.dirname(module.parent.filename);

@@ -10,0 +10,0 @@ // allows for a single string entry

{
"name": "clean-webpack-plugin",
"version": "0.1.2",
"name": "clean-webpack-plugin",
"version": "0.1.3",
"author": "John Agan <johnagan@github.com>",
"description": "A webpack plugin to remove your build folder(s) before building",
"description": "A webpack plugin to remove your build folder(s) before building",
"homepage": "https://github.com/johnagan/clean-webpack-plugin",

@@ -14,6 +14,6 @@ "licenses": "MIT",

],
"repository": {
"type": "git",
"url" : "https://github.com/johnagan/clean-webpack-plugin.git"
},
"repository": {
"type": "git",
"url" : "https://github.com/johnagan/clean-webpack-plugin.git"
},
"bugs": {

@@ -20,0 +20,0 @@ "url": "https://github.com/johnagan/clean-webpack-plugin/issues"

# Clean for webpack
A webpack plugin to remove/clean your build folder(s) before building
## Usage
## `new Clean(paths, context)`
* **Parameters**
- **paths**: Array of paths *(example: ['dist', 'build'])*
- **context**: root path, by default uses path where located *webpack.config.js*
## Example
``` javascript
var Clean = require("clean-webpack-plugin");
var Clean = require('clean-webpack-plugin');
module.exports = {
plugins: [
new Clean(['dist', 'build'])
]
plugins: [
new Clean(['dist', 'build'])
]
}

@@ -17,2 +22,2 @@ ```

MIT (http://www.opensource.org/licenses/mit-license.php)
MIT (http://www.opensource.org/licenses/mit-license.php)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc