CLI
PurgeCSS is available via a CLI. You can use the CLI by itself or with a configuration file.
Installation
Usage
To see the available options for the CLI: purgecss --help
The options available through the CLI are similar to the ones available with a configuration file. You can also use the CLI with a configuration file.
--css
--content
--config
--out
By default, the CLI outputs the result in the console. If you wish to return the CSS as files, specify the directory to write the purified CSS files to.
--whitelist
If you wish to prevent PurgeCSS from removing a specific CSS selector, you can whitelist it.
Example
Last updated