Package Exports
- purify-css
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (purify-css) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
PurifyCSS
A tool that removes CSS that you aren't using in your app, which results in smaller file sizes, which ultimately reduces load time.
- Check which classes you use in your HTML or Javascript.
- Filter out your CSS file with only the classes that you do use.
- ??
- Profit
Install
npm install purify-cssAPI
var purify = require('purify-css');
purify(content, css, options);content
Type: Array or String
Array of filepaths to the files you want purify to search through for used classes (HTML, Javascripts, Templates, anything)
String of content you want us to look for used classes.
css
Type: Array or String
Array of filepaths to the css files you want us to filter.
String of css you want us to filter.
##options
Type: Object
Properties of options object:
minify:Set totrueto minify. Default:falseoutput:Filepath to write purified css to. Returns raw string iffalse. Default:falseinfo:Logs info on how much css was removed iftrue. Default:false