MCPcopy
hub / github.com/FullHuman/purgecss / parseCommandOptions

Function parseCommandOptions

packages/purgecss/src/bin.ts:44–78  ·  view source on GitHub ↗
(program: Command)

Source from the content-addressed store, hash-verified

42};
43
44export function parseCommandOptions(program: Command): Command {
45 program
46 .description(packageJson.description)
47 .version(packageJson.version)
48 .usage("--css <css...> --content <content...> [options]");
49
50 program
51 .option("-con, --content <files...>", "glob of content files")
52 .option("-css, --css <files...>", "glob of css files")
53 .option("-c, --config <path>", "path to the configuration file")
54 .option(
55 "-o, --output <path>",
56 "file path directory to write purged css files to",
57 )
58 .option("-font, --font-face", "option to remove unused font-faces")
59 .option("-keyframes, --keyframes", "option to remove unused keyframes")
60 .option("-v, --variables", "option to remove unused variables")
61 .option("-rejected, --rejected", "option to output rejected selectors")
62 .option("-rejected-css, --rejected-css", "option to output rejected css")
63 .option(
64 "-s, --safelist <list...>",
65 "list of classes that should not be removed",
66 )
67 .option(
68 "-b, --blocklist <list...>",
69 "list of selectors that should be removed",
70 )
71 .option(
72 "-k, --skippedContentGlobs <list...>",
73 "list of glob patterns for folders/files that should not be scanned",
74 )
75 .option("-p, --preserve-paths", "preserve folder hierarchy in the output");
76
77 return program;
78}
79
80export async function getOptions(
81 program: Command,

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…