Wordpress

Last updated 8 months ago

Based on the gist made by @frnwtr, purgecss-with-wordpress is a set of templates for WordPress CMS.

Getting Started

Installation

You need to install purgecss first.

Install purgecss-with-wordpress:

npm i --save-dev purgecss-with-wordpress

Usage

import Purgecss from 'purgecss'
import purgecssWordpress from 'purgecss-with-wordpress'
‚Äč
const purgeCss = new Purgecss({
content: ['**/*.html'],
css: ['**/*.css'],
whitelist: purgecssWordpress.whitelist,
whitelistPatterns: purgecssWordpress.whitelistPatterns
})
const result = purgecss.purge()