hunt-affected-cli

CLI for detecting where your file exports are used and potentially afffected by it's changes

Usage no npm install needed!

<script type="module">
  import huntAffectedCli from 'https://cdn.skypack.dev/hunt-affected-cli';
</script>

README

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:

npm i hunt-affected -g

And run the script under your source code path:

hunt-affected <entryFile> [*|[export1[,export2[,exports]]]]

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)