Metalsmith PurifyCSS
This is a Metalsmith plugin for PurifyCSS.
Installation
To install run:
npm install metalsmith-purifycss --save-dev
or if you're using Yarn
yarn add metalsmith-purifycss --dev
Usage
The API interface is mostly the same as PurifyCSS.
Additional options:
Key | Type | Description |
---|---|---|
removeOriginal |
boolean | Removes files matched by the css option from the output. |
This is the simplest setup:
const purifyCSS = ; // ... Compile CSS/HTML/JavaScript ;});
Note that if you'd like to overwrite the original CSS file, set the output
name to match the css
filename.