Skip to content

Commit

Permalink
Document regex feature
Browse files Browse the repository at this point in the history
  • Loading branch information
elevenpassin committed May 3, 2018
1 parent 4db71a7 commit abaca42
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions README.md
Expand Up @@ -32,10 +32,7 @@ const webpack = require('webpack'); //to access built-in plugins
const path = require('path');

// the path(s) that should be cleaned
let pathsToClean = [
'dist',
'build'
]
let pathsToClean = /dist|build/;

// the clean options to use
let cleanOptions = {
Expand Down Expand Up @@ -71,12 +68,13 @@ const webpackConfig = {


### Paths (Required)
An [array] of string paths to clean
An [array] of string or regex paths to clean
```js
[
'dist', // removes 'dist' folder
'build/*.*', // removes all files in 'build' folder
'web/*.js' // removes all JavaScript files in 'web' folder
'web/*.js', // removes all JavaScript files in 'web' folder
/_.+/i, // removes all the files / folders matching the regex
]
```

Expand Down

0 comments on commit abaca42

Please sign in to comment.