doc-detective 2.10.1-dev.2 → 2.10.1-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.js +1 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doc-detective",
3
- "version": "2.10.1-dev.2",
3
+ "version": "2.10.1-dev.4",
4
4
  "description": "Treat doc content as testable assertions to validate doc accuracy and product UX.",
5
5
  "bin": {
6
6
  "doc-detective": "src/index.js"
@@ -32,7 +32,7 @@
32
32
  "homepage": "https://github.com/doc-detective/doc-detective#readme",
33
33
  "dependencies": {
34
34
  "doc-detective-common": "^1.14.0",
35
- "doc-detective-core": "^2.10.1-dev.2",
35
+ "doc-detective-core": "^2.10.1-dev.3",
36
36
  "prompt-sync": "^4.2.0",
37
37
  "yargs": "^17.7.2"
38
38
  },
package/src/index.js CHANGED
@@ -10,10 +10,7 @@ main(argv);
10
10
  // Run tests
11
11
  async function main(argv) {
12
12
  // Find index of `doc-detective` or `run` in argv
13
- let index = argv.indexOf("doc-detective");
14
- if (index === -1) {
15
- index = argv.findIndex((arg) => arg.endsWith("index.js"));
16
- }
13
+ const index = argv.findIndex((arg) => arg.endsWith("doc-detective") || arg.endsWith("index.js"));
17
14
  // `command` is the next argument after `doc-detective` or `src/index.js`
18
15
  const command = argv[index + 1];
19
16
  // Set args and config