Skip to content
Permalink
Browse files

feat(CLI): add blocklist option

  • Loading branch information
Ffloriel committed Sep 5, 2020
1 parent 2c3d700 commit 3961afbc6d90eae83fe4862a4498857fa7ba3ff6
Showing with 6 additions and 0 deletions.
  1. +6 −0 packages/purgecss/bin/purgecss.js
@@ -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);
@@ -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);

0 comments on commit 3961afb

Please sign in to comment.
You can’t perform that action at this time.