purgecss-with-wordpress 7.0.2 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +3 -7
- package/package.json +6 -4
package/CHANGELOG.md
ADDED
package/README.md
CHANGED
|
@@ -18,27 +18,23 @@ npm i --save-dev purgecss-with-wordpress
|
|
|
18
18
|
|
|
19
19
|
```js
|
|
20
20
|
|
|
21
|
-
import PurgeCSS from 'purgecss'
|
|
21
|
+
import { PurgeCSS } from 'purgecss'
|
|
22
22
|
import purgecssWordpress from 'purgecss-with-wordpress'
|
|
23
23
|
|
|
24
24
|
const purgeCSSResults = await new PurgeCSS().purge({
|
|
25
25
|
content: ['**/*.html'],
|
|
26
26
|
css: ['**/*.css'],
|
|
27
|
-
safelist: purgecssWordpress.safelist
|
|
28
|
-
safelistPatterns: purgecssWordpress.safelistPatterns
|
|
27
|
+
safelist: purgecssWordpress.safelist
|
|
29
28
|
})
|
|
30
29
|
```
|
|
31
30
|
|
|
32
|
-
If you have additional classes you want to include in
|
|
31
|
+
If you have additional classes you want to include in the `safelist`, you can include them using the spread operator:
|
|
33
32
|
|
|
34
33
|
```js
|
|
35
34
|
safelist: [
|
|
36
35
|
...purgecssWordpress.safelist,
|
|
37
36
|
'red',
|
|
38
37
|
'blue',
|
|
39
|
-
],
|
|
40
|
-
safelistPatterns: [
|
|
41
|
-
...purgecssWordpress.safelistPatterns,
|
|
42
38
|
/^red/,
|
|
43
39
|
/blue$/,
|
|
44
40
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "purgecss-with-wordpress",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "PurgeCSS with wordpress",
|
|
5
5
|
"author": "Ffloriel",
|
|
6
6
|
"homepage": "https://purgecss.com",
|
|
@@ -18,12 +18,14 @@
|
|
|
18
18
|
"purify"
|
|
19
19
|
],
|
|
20
20
|
"license": "MIT",
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=22.12.0"
|
|
23
|
+
},
|
|
21
24
|
"main": "index.js",
|
|
22
25
|
"repository": {
|
|
23
26
|
"type": "git",
|
|
24
27
|
"url": "git+https://github.com/FullHuman/purgecss.git"
|
|
25
28
|
},
|
|
26
|
-
"scripts": {},
|
|
27
29
|
"bugs": {
|
|
28
30
|
"url": "https://github.com/FullHuman/purgecss/issues"
|
|
29
31
|
},
|
|
@@ -31,5 +33,5 @@
|
|
|
31
33
|
"access": "public",
|
|
32
34
|
"registry": "https://registry.npmjs.org/"
|
|
33
35
|
},
|
|
34
|
-
"
|
|
35
|
-
}
|
|
36
|
+
"scripts": {}
|
|
37
|
+
}
|