@gld5000-cli/dependency-finder 1.0.0 → 1.0.1
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.
package/package.json
CHANGED
package/test/test.mjs
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { runDependencyFinder } from "../src/index.mjs";
|
|
2
|
-
import { answerStringQuestion } from "@gld5000-cli/readline";
|
|
3
|
-
|
|
4
|
-
const args = process.argv.slice(2);
|
|
5
|
-
const defaultSearchPattern = "./components/**/*.tsx";
|
|
6
|
-
const searchPattern =
|
|
7
|
-
args[0] ||
|
|
8
|
-
(await answerStringQuestion(
|
|
9
|
-
"Where are your components?",
|
|
10
|
-
defaultSearchPattern,
|
|
11
|
-
));
|
|
12
|
-
|
|
13
|
-
const defaultTargetPaths = "./components/**/*.tsx|./pages/**/*.tsx";
|
|
14
|
-
const targetPaths = `${
|
|
15
|
-
args[1] ||
|
|
16
|
-
(await answerStringQuestion(
|
|
17
|
-
"Which folders should we check for imports (pipe-separated)?",
|
|
18
|
-
defaultTargetPaths,
|
|
19
|
-
))
|
|
20
|
-
}`.split("|");
|
|
21
|
-
|
|
22
|
-
const defaultIgnorePatterns = ".test|.stories";
|
|
23
|
-
const ignorePatterns = `${
|
|
24
|
-
args[2] ||
|
|
25
|
-
(await answerStringQuestion(
|
|
26
|
-
"Which filename patterns should be ignored (pipe-separated)?",
|
|
27
|
-
defaultIgnorePatterns,
|
|
28
|
-
))
|
|
29
|
-
}`.split("|");
|
|
30
|
-
// node test/test.mjs "test/test-components/**/*.tsx" "test/test-components/**/*.tsx" ".test|.stories"
|
|
31
|
-
console.log(
|
|
32
|
-
"searchPattern:",
|
|
33
|
-
searchPattern,
|
|
34
|
-
"targetPaths:",
|
|
35
|
-
targetPaths,
|
|
36
|
-
"ignorePatterns:",
|
|
37
|
-
ignorePatterns,
|
|
38
|
-
);
|
|
39
|
-
runDependencyFinder(searchPattern, targetPaths, ignorePatterns);
|