purgecss-with-gutenberg
v1.0.2
Published
purgecss whitelist & whitelist patterns for the WordPress Gutenberg Block editor
Downloads
43
Maintainers
Readme
Purgecss with Gutenberg
purgecss whitelist for the WordPress Gutenberg editor.
Getting started
Installation First install purgecss.
npm i --save-dev purgecss-with-gutenberg
Usage
import Purgecss from 'purgecss';
import purgecssGutenberg from 'purgecss-with-gutenberg';
const purgeCss = new Purgecss({
whitelist: purgecssGutenberg.whitelist,
whitelistPatterns: purgecssGutenberg.whitelistPatterns
});
const res = purgeCss.purge();
if you have additional classes for whitelist
or whitelistPattners
, you can use the spread operator:
whitelist: [
...purgecssGutenberg.whitelist,
...thirdparty.whitelist,
'my-class'
],
whitelistPatterns: [
...purgecssGutenberg.whitelistPatterns,
...thirdparty.whitelistPatterns,
/^my-(class|id)$/
]