broccoli-uncss

May 1, 2024 · View on GitHub

Remove unused CSS with UnCSS

Issues with the output should be reported on the UnCSS issue tracker.

Install

npm install --save-dev broccoli-uncss

Usage

const UnCSS = require('broccoli-uncss');
tree = new UnCSS(tree, {html: ['index.html']});

API

UnCSS(tree, [options])

options

See the UnCSS options, except for raw.

html

Required
Type: Array

HTML files to use when matching what CSS selectors to filter out.

License

MIT © Sindre Sorhus

Contents

  1. 1Install
  2. 2Usage
  3. 3API
  4. 3.1UnCSS(tree, [options])
  5. 4License