The CLI for detecting where your file exports are used and potentially afffected by it's changes.
Based on hunt-affected with limited support.
Install globally via npm:
npm i hunt-affected -g
And run the script under your source code path:
hunt-affected <entryFile> [*|[export1[,export2[,exports]]]]
All the .js files will be scanned under the script running path by default. You may change this by --source=<glob> option, e.g.:
.js
--source=<glob>
hunt-affected myFile.js default --source=src/*.js
As hunt-affected is using @babel/parser to parse JS files, you may need to take care of the parser configurations. So far it only supports passing plugin option.
hunt-affected
@babel/parser
Following plugins are enabled on .js|.jsx|.ts|.tsx files by default:
.jsx
.ts
.tsx
dynamicImport
classProperties
flowComments
objectRestSpread
functionBind
jsx
flow
typescript
Generated using TypeDoc
hunt-affected-cli
The CLI for detecting where your file exports are used and potentially afffected by it's changes.
Based on hunt-affected with limited support.
Quick starting
Install globally via npm:
And run the script under your source code path:
Options
--source
All the
.js
files will be scanned under the script running path by default. You may change this by--source=<glob>
option, e.g.:hunt-affected myFile.js default --source=src/*.js
--parser-plugins
As
hunt-affected
is using@babel/parser
to parse JS files, you may need to take care of the parser configurations. So far it only supports passing plugin option.Following plugins are enabled on
.js
|.jsx
|.ts
|.tsx
files by default:dynamicImport
classProperties
flowComments
objectRestSpread
functionBind
jsx
flow
(.js and .jsx only)typescript
(.ts and .tsx only)