Skip to content

Commit d513dba

Browse files
authored
Merge pull request #273 from oerd/patch-1
Fix typo, (hopefully) improve readability
2 parents 0fcbca8 + 5e75aa0 commit d513dba

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

docs/plugins/webpack.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ to filter out directories see the glob-all documentation [here](https://www.npmj
8282

8383
## Options
8484

85-
The options available in purgecss [Configuration](https://www.purgecss.com/configuration.html) are also available in the webpack plugin with the exception of css and content.
85+
The options available in purgecss [Configuration](https://www.purgecss.com/configuration.html) are also available in the webpack plugin, with the exception of the `css` and `content` options.
8686

8787
* #### paths
8888

89-
With the webpack plugin, you can specified the content that should be analyzed by purgecss with an array of filename. It can be html, pug, blade, ... files. You can use a module like `glob` or `glob-all` to easily get a list of files.
89+
With the webpack plugin, you can specify the content that should be analyzed by purgecss by providing an array of filenames. These can be html, pug, blade, ... files. You can also use a module like `glob` or `glob-all` to easily get a list of files.
9090

9191
```js
9292
const PurgecssPlugin = require('purgecss-webpack-plugin')
@@ -101,7 +101,7 @@ new PurgecssPlugin({
101101
})
102102
```
103103

104-
If you want to regenerate the paths list on every compilation (e.g. with `--watch`), then you can also pass a function:
104+
If you want to regenerate the list of paths on every compilation (e.g. when using `--watch`), then you can also pass a function to the `paths` option as in the following example:
105105
```js
106106
new PurgecssPlugin({
107107
paths: () => glob.sync(`${PATHS.src}/**/*`, { nodir: true })
@@ -110,7 +110,7 @@ new PurgecssPlugin({
110110

111111
* #### only
112112

113-
You can specify entrypoints to the purgecss-webpack-plugin with the option only:
113+
You can specify entrypoints to the purgecss-webpack-plugin with the option `only`:
114114

115115
```js
116116
new PurgecssPlugin({
@@ -121,13 +121,14 @@ new PurgecssPlugin({
121121

122122
* #### whitelist, whitelistPatterns and whitelistPatternsChildren
123123

124-
Similar as for the `paths` option, you also can define functions for the these options:
124+
Similar as for the `paths` option, you can also define functions for the following options:
125125

126126
```js
127127
function collectWhitelist() {
128128
// do something to collect the whitelist
129129
return ['whitelisted'];
130130
}
131+
131132
function collectWhitelistPatterns() {
132133
// do something to collect the whitelist
133134
return [/^whitelisted-/];
@@ -148,4 +149,4 @@ new PurgecssPlugin({
148149

149150
* #### rejected
150151

151-
If `true` all removed selectors are added to the [Stats Data](https://webpack.js.org/api/stats/) as `purged`.
152+
When this option is set to `true` all removed selectors are added to the [Stats Data](https://webpack.js.org/api/stats/) as `purged`.

0 commit comments

Comments
 (0)