0.3.0 • Published 6 years ago

metalsmith-purifycss v0.3.0

Weekly downloads
31
License
MIT
Repository
github
Last release
6 years ago

Metalsmith PurifyCSS

Build Status

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:

KeyTypeDescription
removeOriginalbooleanRemoves files matched by the css option from the output.

This is the simplest setup:

const purifyCSS = require('metalsmith-purifycss');

Metalsmith()
  // ... Compile CSS/HTML/JavaScript
  .use(purifyCSS({
    content: ['*.html', '*.js'],
    css: ['styles.css'],
    output: 'styles-purified.css',
  }))
  .build((err, files) => {
    if (err) throw new err;
  });
});

Note that if you'd like to overwrite the original CSS file, set the output name to match the css filename.

0.3.0

6 years ago

0.2.0

7 years ago

0.1.0

7 years ago