remove-webpack-plugin

Plugin for webpack to remove directories or files.

MIT License

Downloads
933
Stars
2
Committers
2

Remove Webpack Plugin

Plugin for webpack to remove directories or files. (rm -r)

Installation

Install the plugin with npm:

npm install remove-webpack-plugin --save-dev

Examples Webpack Config

var RemoveWebpackPlugin = require('remove-webpack-plugin');

module.exports = {
  plugins: [
    new RemoveWebpackPlugin('./public/')
  ]
}
var RemoveWebpackPlugin = require('remove-webpack-plugin');

module.exports = {
  plugins: [
    new RemoveWebpackPlugin(['./public/', './build/'], )
  ]
}
var RemoveWebpackPlugin = require('remove-webpack-plugin');

module.exports = {
  plugins: [
    new RemoveWebpackPlugin(['./public/', './build/'], 'show')
  ]
}
var RemoveWebpackPlugin = require('remove-webpack-plugin');

module.exports = {
  plugins: [
    new RemoveWebpackPlugin(['./public/', './build/'], 'hide')
  ]
}
var RemoveWebpackPlugin = require('remove-webpack-plugin');

module.exports = {
  plugins: [
    new RemoveWebpackPlugin(['./public/', './build/'], 'fatal')
  ]
}
var RemoveWebpackPlugin = require('remove-webpack-plugin');

module.exports = {
  plugins: [
    new RemoveWebpackPlugin(['./public/', './build/'], {
		errors: 'hide'
	})
  ]
}
var RemoveWebpackPlugin = require('remove-webpack-plugin');

module.exports = {
  plugins: [
    new RemoveWebpackPlugin(['./public/', './build/'], {
		errors: 'show'
	})
  ]
}
var RemoveWebpackPlugin = require('remove-webpack-plugin');

module.exports = {
  plugins: [
    new RemoveWebpackPlugin(['./public/', './build/'], {
		errors: 'fatal'
	})
  ]
}

Usage

new RemoveWebpackPlugin(paths, ?settings)

Params

  • paths: Array || String
  • errors/settings: String("show" || "hide" || 'fatal')/Object{ errors: "show" || "hide" || "fatal"}
    default: "show"

License

MIT

Package Rankings
Top 6.77% on Npmjs.org
Badges
Extracted from project README
npm version NPM wercker status Package Quality
Related Projects