Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ali322/cleanup-webpack-plugin
cleanup extraneous files by webpack
https://github.com/ali322/cleanup-webpack-plugin
cleanup webpack webpack4
Last synced: 10 days ago
JSON representation
cleanup extraneous files by webpack
- Host: GitHub
- URL: https://github.com/ali322/cleanup-webpack-plugin
- Owner: ali322
- Created: 2018-04-28T07:51:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-04-28T07:58:12.000Z (over 6 years ago)
- Last Synced: 2024-10-11T09:14:45.691Z (about 1 month ago)
- Topics: cleanup, webpack, webpack4
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
cleanup-webpack-plugin [![Build Status](https://travis-ci.org/ali322/cleanup-webpack-plugin.svg?branch=master)](https://travis-ci.org/ali322/cleanup-webpack-plugin) [![npm version](https://badge.fury.io/js/cleanup-webpack-plugin.svg)](https://badge.fury.io/js/cleanup-webpack-plugin)
===
[![NPM](https://nodei.co/npm/cleanup-webpack-plugin.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/cleanup-webpack-plugin/)inspired by [webpack-cleanup-plugin](https://github.com/gpbl/webpack-cleanup-plugin/blob/master/src/WebpackCleanupPlugin.js),cleanup files before run or after done
Usage
===add plugin in your webpack.config.js
```javascript
var CleanupPlugin = require('cleanup-webpack-plugin')module.exports = {
entry:{
index:"./index.js"
},
module:{
loaders:[
...
]
},
output:{
path:'./dist',
filename:'[name]-[hash:8].min.js'
},
plugins:[
new CleanupPlugin({
include: ['./dist/*.js']
})
]
}
```this plugin will delete all .js files in dist directory before webpack bundle run everytime
Plugin Options
===- **include**: delete files include which match glob patterns
- **exclude**: delete all files exclude which match glob patterns, if include options is provide, then this option will be ignore
- **when**: should be `before` or `after`## License
[MIT License](http://en.wikipedia.org/wiki/MIT_License)