diff --git a/README.md b/README.md index 4b42342..9d66410 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ For more info, run any command with the `--help` flag: $ ts-remove-unused --help Options: - --project Path to your tsconfig.json + -p, --project Path to your tsconfig.json --skip Specify the regexp pattern to match files that should be skipped from transforming --include-d-ts Include .d.ts files in target for transformation --check Check if there are any unused exports without removing them @@ -133,12 +133,12 @@ Options: ``` -#### `--project` +#### `-p`, `--project` Specifies the `tsconfig.json` that is used to analyze your codebase. Defaults to `tsconfig.json` in your project root. ```bash -npx @line/ts-remove-unused --skip tsconfig.client.json +npx @line/ts-remove-unused --project tsconfig.client.json ``` #### `--skip` @@ -161,7 +161,7 @@ Use `--check` to check for unused files and exports without making changes to pr npx @line/ts-remove-unused --skip 'src/main\.ts' --check ``` -#### `-r, --recursive` +#### `-r`, `--recursive` The default behavior of the CLI is to process all files once. Some issues may not be detected if the unused code is a result of the modification of another file in the project. When this option is enabled, ts-remove-unused will recursively re-edit/re-check files that may be affected by a file edit. diff --git a/lib/cli.ts b/lib/cli.ts index 5683bcd..f2837af 100644 --- a/lib/cli.ts +++ b/lib/cli.ts @@ -10,7 +10,7 @@ const cli = cac('ts-remove-unused'); cli .command('', 'There are no subcommands. Simply execute ts-remove-unused') - .option('--project ', 'Path to your tsconfig.json') + .option('-p, --project ', 'Path to your tsconfig.json') .option( '--skip ', 'Specify the regexp pattern to match files that should be skipped from transforming',