(program: Command)
| 42 | }; |
| 43 | |
| 44 | export 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 | |
| 80 | export async function getOptions( |
| 81 | program: Command, |
no outgoing calls
no test coverage detected
searching dependent graphs…