Silvestr-b / postcss-remove-unused

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PostCSS Remove unused Build Status

PostCSS This plugin remove CSS rules that are not contained in JSON like: ['.button', '.someSelector']

From:

.button {
    background: #0099cc; 
}
.icon {
	padding: 8px;
}
.button .icon {
	margin: 4px;
}

With:

// path/to/file.json
['.button', 'someSelector']

To:

.button {
    background: #0099cc; 
}

Usage

const options = {
	file: 'path/to/file.json' 
}

postcss([ require('postcss-remove-unused')(options) ])

See PostCSS docs for examples for your environment.

About

License:MIT License


Languages

Language:JavaScript 100.0%