Skip to content

Commit

Permalink
feat(CLI): add blocklist option
Browse files Browse the repository at this point in the history
  • Loading branch information
Ffloriel committed Sep 5, 2020
1 parent 2c3d700 commit 3961afb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/purgecss/bin/purgecss.js
Expand Up @@ -39,6 +39,11 @@ program
"-s, --safellist <list>",
"list of classes that should not be removed (comma separated)",
getList
)
.option(
"-b, --blocklist <list>",
"list of selectors that should be removed",
getList
);

program.parse(process.argv);
Expand All @@ -63,6 +68,7 @@ if (!program.config && !(program.content && program.css)) {
if (program.rejected) options.rejected = program.rejected;
if (program.variables) options.variables = program.variables;
if (program.safelist) options.safelist = program.safelist;
if (program.blocklist) options.blocklist = program.blocklist;

const purged = await new PurgeCSS().purge(options);

Expand Down

0 comments on commit 3961afb

Please sign in to comment.