|
76 | 76 | dpdm -T ./src/index.ts |
77 | 77 | ``` |
78 | 78 |
|
| 79 | +5. Find unused files by `index.js` in `src` directory: |
| 80 | + |
| 81 | + ```bash |
| 82 | + dpdm --no-tree --no-warning --no-circular --detect-unused-files-from 'src/**/*.*' 'index.js' |
| 83 | + ``` |
| 84 | + |
79 | 85 | ### Options |
80 | 86 |
|
81 | 87 | ```bash |
82 | 88 | $ dpdm --help |
83 | | -dpdm [options] <files...> |
| 89 | +dpdm.ts [options] <files...> |
84 | 90 |
|
85 | 91 | Analyze the files' dependencies. |
86 | 92 |
|
87 | 93 | Positionals: |
88 | | - files The file paths or globs [string] |
| 94 | + files The file paths or globs [string] |
89 | 95 |
|
90 | 96 | Options: |
91 | | - --version Show version number [boolean] |
92 | | - --context the context directory to shorten path, default is current |
93 | | - directory [string] |
94 | | - --extensions, --ext comma separated extensions to resolve |
95 | | - [string] [default: ".ts,.tsx,.mjs,.js,.jsx,.json"] |
96 | | - --js comma separated extensions indicate the file is js like |
97 | | - [string] [default: ".ts,.tsx,.mjs,.js,.jsx"] |
98 | | - --include included filenames regexp in string, default includes all files |
99 | | - [string] [default: ".*"] |
100 | | - --exclude excluded filenames regexp in string, set as empty string to |
101 | | - include all files [string] [default: "node_modules"] |
102 | | - -o, --output output json to file [string] |
103 | | - --tree print tree to stdout [boolean] [default: true] |
104 | | - --circular print circular to stdout [boolean] [default: true] |
105 | | - --warning print warning to stdout [boolean] [default: true] |
106 | | - --tsconfig the tsconfig path, which is used for resolve path alias, |
107 | | - default is tsconfig.json if it exists in context directory |
108 | | - [string] |
109 | | - -T, --transform transform typescript modules to javascript before analyze, it |
110 | | - allows you to omit types dependency in typescript |
111 | | - [boolean] [default: false] |
112 | | - --exit-code exit with specified code, the value format is CASE:CODE, |
113 | | - `circular` is the only supported CASE, CODE should be a integer |
114 | | - between 0 and 128. For example: `dpdm --exit-code circular:1` |
115 | | - the program will exit with code 1 if circular dependency found. |
116 | | - [string] |
117 | | - --progress show progress bar [boolean] [default: true] |
118 | | - -h, --help Show help [boolean] |
| 97 | + --version Show version number [boolean] |
| 98 | + --context the context directory to shorten path, default is current |
| 99 | + directory [string] |
| 100 | + --extensions, --ext comma separated extensions to resolve |
| 101 | + [string] [default: ".ts,.tsx,.mjs,.js,.jsx,.json"] |
| 102 | + --js comma separated extensions indicate the file is js like |
| 103 | + [string] [default: ".ts,.tsx,.mjs,.js,.jsx"] |
| 104 | + --include included filenames regexp in string, default includes all files |
| 105 | + [string] [default: ".*"] |
| 106 | + --exclude excluded filenames regexp in string, set as empty string to |
| 107 | + include all files [string] [default: "node_modules"] |
| 108 | + -o, --output output json to file [string] |
| 109 | + --tree print tree to stdout [boolean] [default: true] |
| 110 | + --circular print circular to stdout [boolean] [default: true] |
| 111 | + --warning print warning to stdout [boolean] [default: true] |
| 112 | + --tsconfig the tsconfig path, which is used for resolve path alias, default |
| 113 | + is tsconfig.json if it exists in context directory [string] |
| 114 | + -T, --transform transform typescript modules to javascript before analyze, it |
| 115 | + allows you to omit types dependency in typescript |
| 116 | + [boolean] [default: false] |
| 117 | + --exit-code exit with specified code, the value format is CASE:CODE, |
| 118 | + `circular` is the only supported CASE, CODE should be a integer |
| 119 | + between 0 and 128. For example: `dpdm --exit-code circular:1` the |
| 120 | + program will exit with code 1 if circular dependency found. |
| 121 | + [string] |
| 122 | + --progress show progress bar [boolean] [default: true] |
| 123 | + --detect-unused-files-from this file is a glob, used for finding unused files [string] |
| 124 | + -h, --help Show help [boolean] |
119 | 125 | ``` |
120 | 126 |
|
121 | 127 | ### Example output |
|
0 commit comments