🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

purgecss-with-wordpress

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

purgecss-with-wordpress - npm Package Compare versions

Comparing version

to
3.0.0

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$/,