PurgeCSS class
Class used to instantiate PurgeCSS and can then be used to purge CSS files.
Signature:
declare class PurgeCSS
Example
await new PurgeCSS().purge({
content: ['index.html'],
css: ['css/app.css']
})
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
postcss.Node[] | |||
Set<string> | |||
Methods
Method | Modifiers | Description |
---|---|---|
Extract the selectors present in the files using a PurgeCSS extractor | ||
Extract the selectors present in the passed string using a PurgeCSS extractor | ||
Get the purged version of the css based on the files | ||
Remove unused CSS | ||
Remove unused CSS variables | ||
Remove unused font-faces | ||
Remove unused keyframes | ||
Walk through the CSS AST and remove unused CSS |