build a list of all files and dependencies transitively imported by starting file(s)
npm install jscodeshift-build-import-list




build a list of all files and dependencies transitively imported by starting file(s)
``sh`
npm install --save-dev jscodeshift-build-import-list
Requires Node >= 8.
Dynamic require() and import() paths are not supported; an Error will be@jscodeshift-build-import-list ignore
thrown if dynamic path is encountered (unless you have a leading comment containing).
However, calls to require-glob
with a string literal argument are supported.
Builds a list of all files and npm packages imported from the given files,
the files imported by them, and sort forth.
The file(s) to start from.
A Promise that will resolve to an object with two properties:
#### files
A Set of local files transitively imported by the starting file(s)
#### dependencies
A Set of npm packages transitively imported by the starting file(s)
Add a leading comment containing @jscodeshift-build-import-list ignore, for example:
`js``
// @jscodeshift-build-import-list ignore
import foo from 'foo'
const bar = / @jscodeshift-build-import-list ignore / require(getBarPath())