purgecss-with-wordpress
Advanced tools
42
index.js
module.exports = { | ||
whitelist: [ | ||
'rtl', | ||
'home', | ||
'blog', | ||
'archive', | ||
'date', | ||
'error404', | ||
'logged-in', | ||
'admin-bar', | ||
'no-customize-support', | ||
'custom-background', | ||
'wp-custom-logo', | ||
'alignnone', | ||
'alignright', | ||
'alignleft', | ||
'wp-caption', | ||
'wp-caption-text', | ||
'screen-reader-text', | ||
'comment-list', | ||
'wp-social-link', | ||
], | ||
whitelistPatterns: [ | ||
safelist: [ | ||
"rtl", | ||
"home", | ||
"blog", | ||
"archive", | ||
"date", | ||
"error404", | ||
"logged-in", | ||
"admin-bar", | ||
"no-customize-support", | ||
"custom-background", | ||
"wp-custom-logo", | ||
"alignnone", | ||
"alignright", | ||
"alignleft", | ||
"wp-caption", | ||
"wp-caption-text", | ||
"screen-reader-text", | ||
"comment-list", | ||
"wp-social-link", | ||
/^search(-.*)?$/, | ||
@@ -25,0 +23,0 @@ /^(.*)-template(-.*)?$/, |
{ | ||
"name": "purgecss-with-wordpress", | ||
"version": "2.3.0", | ||
"version": "3.0.0", | ||
"description": "PurgeCSS with wordpress", | ||
@@ -32,3 +32,3 @@ "author": "Ffloriel", | ||
}, | ||
"gitHead": "5314e41edf328e2ad2639549e1587b82a964a42e" | ||
"gitHead": "4a2a9504a41fe361f5aa36f3a2e50eabee84aec0" | ||
} |
@@ -27,17 +27,17 @@ # PurgeCSS with Wordpress | ||
css: ['**/*.css'], | ||
whitelist: purgecssWordpress.whitelist, | ||
whitelistPatterns: purgecssWordpress.whitelistPatterns | ||
safelist: purgecssWordpress.safelist, | ||
safelistPatterns: purgecssWordpress.safelistPatterns | ||
}) | ||
``` | ||
If you have additional classes you want to include in either of the `whitelist` or `whitelistPatterns`, you can include them using the spread operator: | ||
If you have additional classes you want to include in either of the `safelist` or `safelistPatterns`, you can include them using the spread operator: | ||
```js | ||
whitelist: [ | ||
...purgecssWordpress.whitelist, | ||
safelist: [ | ||
...purgecssWordpress.safelist, | ||
'red', | ||
'blue', | ||
], | ||
whitelistPatterns: [ | ||
...purgecssWordpress.whitelistPatterns, | ||
safelistPatterns: [ | ||
...purgecssWordpress.safelistPatterns, | ||
/^red/, | ||
@@ -44,0 +44,0 @@ /blue$/, |
3981
-0.97%42
-4.55%