Skip to content

Commit ec62845

Browse files
committed
Replace option names with CLI flags in the docs
1 parent c527c72 commit ec62845

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ npm i -g code-path-graph
2626
code-path-graph [--detail=<...>] [--ecma-version=<...>] [--source-type=<...>] <file>
2727
```
2828

29-
**`detail`** controls the information printed in nodes of the graph. Valid values are:
29+
**`--detail`** controls the information printed in nodes of the graph. Valid values are:
3030

3131
* `nodes`\
3232
Print node traversal info only (default)
@@ -35,15 +35,15 @@ Print segment names only
3535
* `full`\
3636
Print both segment names and node traversal info
3737

38-
**`ecmaVersion`** specifies the JavaScript language version.
38+
**`--ecma-version`** specifies the JavaScript language version.
3939
Valid values are numbers or the string `latest` (default).
4040

41-
**`sourceType`** specifies the type of JavaScript code. Valid values are:
41+
**`--source-type`** specifies the type of JavaScript code. Valid values are:
4242

4343
* `script`\
44-
Script (default for `ecmaVersion` 3 or 5)
44+
Script (default when `--ecma-version` is `3` or `5`)
4545
* `module`\
46-
ECMAScript module (default for other values of `ecmaVersion`)
46+
ECMAScript module (default for other values of `--ecma-version`)
4747
* `commonjs`\
4848
CommonJS module
4949

lib/cli.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,17 @@ if (isDeepStrictEqual(args, ['--help']))
8686
'\n' +
8787
'Create Mermaid state diagrams of code paths in a JavaScript file.\n' +
8888
'\n' +
89-
'`detail` controls the information printed in nodes of the graph. Valid values are:\n' +
89+
'`--detail` controls the information printed in nodes of the graph. Valid values are:\n' +
9090
' nodes Print node traversal info only (default)\n' +
9191
' segments Print segment names only\n' +
9292
' full Print both segment names and node traversal info\n' +
9393
'\n' +
94-
'`ecmaVersion` specifies the JavaScript language version.\n' +
95-
'Valid values are numbers or the string "latest" (default).\n' +
94+
'`--ecma-version` specifies the JavaScript language version.\n' +
95+
'Valid values are numbers or the string `latest` (default).\n' +
9696
'\n' +
97-
'`sourceType` specifies the type of JavaScript code. Valid valus are:\n' +
98-
' script Script (default for `ecmaVersion` 3 or 5)\n' +
99-
' module ECMAScript module (default for other values of `ecmaVersion`)\n' +
97+
'`--source-type` specifies the type of JavaScript code. Valid valus are:\n' +
98+
' script Script (default when `--ecma-version` is `3` or `5`)\n' +
99+
' module ECMAScript module (default for other values of `--ecma-version`)\n' +
100100
' commonjs CommonJS module\n';
101101
console.log(message);
102102
}

0 commit comments

Comments
 (0)