Skip to content

Commit 62046d9

Browse files
committed
Add Commands to README
1 parent 45a85d2 commit 62046d9

1 file changed

Lines changed: 118 additions & 0 deletions

File tree

README.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,121 @@ Run in a directory of interest via [`npx`](https://www.npmjs.com/package/npx):
1414
cd your-project-folder
1515
npx @sompylasar/code-insights <tool-name> [tool-arg]...
1616
```
17+
18+
## Commands
19+
20+
```
21+
Run a tool from the toolbox.
22+
23+
Usage: npx @sompylasar/code-insights <tool-name> [tool-arg]...
24+
25+
Options:
26+
--help This help.
27+
28+
Examples:
29+
npx @sompylasar/code-insights js-complex
30+
31+
npx @sompylasar/code-insights todo --write
32+
33+
npx @sompylasar/code-insights --help
34+
35+
```
36+
37+
### `dup-names`
38+
39+
```
40+
Find duplicate file names across directories.
41+
42+
Usage: npx @sompylasar/code-insights dup-names [options]
43+
44+
Options:
45+
--js-only Scan JavaScript (.js) files only. Default: js|scss|sass|less|css|html|json|yml
46+
47+
--help This help.
48+
49+
```
50+
51+
### `js-complex`
52+
53+
```
54+
Measure JavaScript code maintainability index of each source file via "escomplex".
55+
56+
Usage: npx @sompylasar/code-insights js-complex [options]
57+
58+
Options:
59+
--grep <regexp> Regular expression to match the relative file paths against.
60+
61+
--invert Inverts the regular expression to ignore the matching files.
62+
63+
--verbose Print detailed report.
64+
65+
--help This help.
66+
67+
Examples:
68+
npx @sompylasar/code-insights js-complex
69+
70+
npx @sompylasar/code-insights js-complex --grep '.*/components/.*'
71+
72+
npx @sompylasar/code-insights js-complex --grep '.*/test/.*' --invert
73+
74+
npx @sompylasar/code-insights js-complex --verbose
75+
76+
```
77+
78+
### `js-deps`
79+
80+
```
81+
Find dependencies inside source code files.
82+
83+
Usage: npx @sompylasar/code-insights js-deps [options]
84+
85+
Options:
86+
--verbose List all found dependencies.
87+
88+
--help This help.
89+
90+
```
91+
92+
### `loc`
93+
94+
```
95+
Count lines of code (LOC) of each file, aggregate statistics.
96+
97+
Usage: npx @sompylasar/code-insights loc [options]
98+
99+
Options:
100+
--js-only Scan JavaScript (.js) files only. Default: js|scss|sass|less|css|html|json|yml
101+
102+
--help This help.
103+
104+
```
105+
106+
### `react-redux-connect`
107+
108+
```
109+
Find files that may contain React Redux connected components, i.e. import from "react-redux" or "redux-form".
110+
111+
Usage: npx @sompylasar/code-insights react-redux-connect [options]
112+
113+
Options:
114+
--help This help.
115+
116+
```
117+
118+
### `todo`
119+
120+
```
121+
Collect TODO comments from source code files into a Markdown list.
122+
123+
Usage: npx @sompylasar/code-insights todo [options]
124+
125+
Options:
126+
--write [filename] Write the file and add it to Git. Default file name: TODO.md
127+
128+
--team-username <username> GitHub username of the team.
129+
130+
--skip-git Do not try to add the file to Git.
131+
132+
--help This help.
133+
134+
```

0 commit comments

Comments
 (0)