Skip to content
This repository was archived by the owner on Feb 1, 2020. It is now read-only.

Latest commit

 

History

History
31 lines (21 loc) · 720 Bytes

wordpress.md

File metadata and controls

31 lines (21 loc) · 720 Bytes

WordPress

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()