Skip to content

Commit

Permalink
Add Commands to README
Browse files Browse the repository at this point in the history
  • Loading branch information
sompylasar committed Dec 29, 2018
1 parent 45a85d2 commit 62046d9
Showing 1 changed file with 118 additions and 0 deletions.
118 changes: 118 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,121 @@ Run in a directory of interest via [`npx`](https://www.npmjs.com/package/npx):
cd your-project-folder
npx @sompylasar/code-insights <tool-name> [tool-arg]...
```

## Commands

```
Run a tool from the toolbox.
Usage: npx @sompylasar/code-insights <tool-name> [tool-arg]...
Options:
--help This help.
Examples:
npx @sompylasar/code-insights js-complex
npx @sompylasar/code-insights todo --write
npx @sompylasar/code-insights --help
```

### `dup-names`

```
Find duplicate file names across directories.
Usage: npx @sompylasar/code-insights dup-names [options]
Options:
--js-only Scan JavaScript (.js) files only. Default: js|scss|sass|less|css|html|json|yml
--help This help.
```

### `js-complex`

```
Measure JavaScript code maintainability index of each source file via "escomplex".
Usage: npx @sompylasar/code-insights js-complex [options]
Options:
--grep <regexp> Regular expression to match the relative file paths against.
--invert Inverts the regular expression to ignore the matching files.
--verbose Print detailed report.
--help This help.
Examples:
npx @sompylasar/code-insights js-complex
npx @sompylasar/code-insights js-complex --grep '.*/components/.*'
npx @sompylasar/code-insights js-complex --grep '.*/test/.*' --invert
npx @sompylasar/code-insights js-complex --verbose
```

### `js-deps`

```
Find dependencies inside source code files.
Usage: npx @sompylasar/code-insights js-deps [options]
Options:
--verbose List all found dependencies.
--help This help.
```

### `loc`

```
Count lines of code (LOC) of each file, aggregate statistics.
Usage: npx @sompylasar/code-insights loc [options]
Options:
--js-only Scan JavaScript (.js) files only. Default: js|scss|sass|less|css|html|json|yml
--help This help.
```

### `react-redux-connect`

```
Find files that may contain React Redux connected components, i.e. import from "react-redux" or "redux-form".
Usage: npx @sompylasar/code-insights react-redux-connect [options]
Options:
--help This help.
```

### `todo`

```
Collect TODO comments from source code files into a Markdown list.
Usage: npx @sompylasar/code-insights todo [options]
Options:
--write [filename] Write the file and add it to Git. Default file name: TODO.md
--team-username <username> GitHub username of the team.
--skip-git Do not try to add the file to Git.
--help This help.
```

0 comments on commit 62046d9

Please sign in to comment.