🚀 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
1.1.0

module.exports = {
whitelist: [
"rtl",
"home",
"blog",
"archive",
"date",
"error404",
"logged-in",
"admin-bar",
"no-customize-support",
"custom-background",
"wp-custom-logo"
'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',
],
whitelistPatterns: [
/^search(-.*)?$/,
/^(.*)-template(-.*)?$/,
/^(.*)?-?single(-.*)?$/,
/^postid-(.*)?$/,
/^attachmentid-(.*)?$/,
/^attachment(-.*)?$/,
/^page(-.*)?$/,
/^(post-type-)?archive(-.*)?$/,
/^author(-.*)?$/,
/^category(-.*)?$/,
/^tag(-.*)?$/,
/^tax-(.*)?$/,
/^term-(.*)?$/,
/^(.*)?-?paged(-.*)?$/
]
}
/^search(-.*)?$/,
/^(.*)-template(-.*)?$/,
/^(.*)?-?single(-.*)?$/,
/^postid-(.*)?$/,
/^attachmentid-(.*)?$/,
/^attachment(-.*)?$/,
/^page(-.*)?$/,
/^(post-type-)?archive(-.*)?$/,
/^author(-.*)?$/,
/^category(-.*)?$/,
/^tag(-.*)?$/,
/^tax-(.*)?$/,
/^term-(.*)?$/,
/^(.*)?-?paged(-.*)?$/,
],
};
{
"name": "purgecss-with-wordpress",
"version": "1.0.0",
"version": "1.1.0",
"description": "purgecss with wordpress",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -23,3 +23,3 @@ # Purgecss with Wordpress

import Purgecss from 'purgecss'
import purgecssWordpress from 'purgecss-with-worpress'
import purgecssWordpress from 'purgecss-with-wordpress'

@@ -29,3 +29,3 @@ const purgeCss = new Purgecss({

css: ['**/*.css'],
whitelist: purgecssWorpress.whitelist,
whitelist: purgecssWordpress.whitelist,
whitelistPatterns: purgecssWordpress.whitelistPatterns

@@ -36,2 +36,17 @@ })

If you have additional classes you want to include in either of the `whitelist` or `whitelistPatterns`, you can include them using the spread operator:
```js
whitelist: [
...purgecssWordpress.whitelist,
'red',
'blue',
],
whitelistPatterns: [
...purgecssWordpress.whitelistPatterns,
/^red/,
/blue$/,
]
```
## Versioning

@@ -48,2 +63,2 @@

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
for details.
for details.