File tree Expand file tree Collapse file tree 1 file changed +10
-15
lines changed
Expand file tree Collapse file tree 1 file changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,14 @@ import { resolve } from "path";
33import * as commander from "commander" ;
44
55const pkg = getPackageJson ( ) ;
6+ const examples = [
7+ "$ code-complexity <dir>" ,
8+ "$ code-complexity <dir> --limit 3" ,
9+ "$ code-complexity <dir> --details" ,
10+ "$ code-complexity <dir> --min 10 --max 50" ,
11+ "$ code-complexity <dir> --sort complexity" ,
12+ "$ code-complexity <dir> --details --limit 10 --sort complexity"
13+ ] ;
614
715export default commander
816 . usage ( "<dir>" )
@@ -29,22 +37,9 @@ export default commander
2937 . option ( "--max [max]" , "Exclude results above <max>" , parseInt )
3038 . on ( "--help" , ( ) => {
3139 console . log ( ) ;
32- console . log (
33- " Examples (using the source code instead of npm published versions):"
34- ) ;
40+ console . log ( "Examples:" ) ;
3541 console . log ( ) ;
36- console . log (
37- " $ npm run build && node dist/index.js /path/to/git/directory"
38- ) ;
39- console . log (
40- " $ npm run build && node dist/index.js /path/to/git/directory --limit 3"
41- ) ;
42- console . log (
43- " $ npm run build && node dist/index.js /path/to/git/directory --details"
44- ) ;
45- console . log (
46- " $ npx code-complexity /path/to/git/directory --min 10 --max 50"
47- ) ;
42+ examples . forEach ( example => console . log ( ` ${ example } ` ) ) ;
4843 console . log ( ) ;
4944 } )
5045 . parse ( process . argv ) ;
You can’t perform that action at this time.
0 commit comments