| 5 | import { yargsCli } from './yargs-cli.js'; |
| 6 | |
| 7 | export const cli = (args: string[]) => |
| 8 | yargsCli(args, { |
| 9 | usageMessage: CLI_DISPLAY_NAME, |
| 10 | scriptName: CLI_SCRIPT_NAME, |
| 11 | options, |
| 12 | groups, |
| 13 | examples: [ |
| 14 | [ |
| 15 | 'code-pushup', |
| 16 | 'Run collect followed by upload based on configuration from code-pushup.config.* file.', |
| 17 | ], |
| 18 | [ |
| 19 | 'code-pushup collect --tsconfig=tsconfig.base.json', |
| 20 | 'Run collect using custom tsconfig to parse code-pushup.config.ts file.', |
| 21 | ], |
| 22 | [ |
| 23 | 'code-pushup collect --onlyPlugins=coverage', |
| 24 | 'Run collect with only coverage plugin, other plugins from config file will be skipped.', |
| 25 | ], |
| 26 | [ |
| 27 | 'code-pushup collect --skipPlugins=coverage', |
| 28 | 'Run collect skipping the coverage plugin, other plugins from config file will be included.', |
| 29 | ], |
| 30 | [ |
| 31 | 'code-pushup upload --persist.outputDir=dist --upload.apiKey=$CP_API_KEY', |
| 32 | 'Upload dist/report.json to portal using API key from environment variable', |
| 33 | ], |
| 34 | [ |
| 35 | 'code-pushup print-config --config code-pushup.config.test.js', |
| 36 | 'Print resolved config object parsed from custom config location', |
| 37 | ], |
| 38 | ], |
| 39 | middlewares, |
| 40 | commands, |
| 41 | }); |