This project scans an arbitrary NodeJS directory and returns a list of the require
ed modules, including core and local. CommonJS, AMD, and JS Module require types are supported.
- Install >= node.js 10
- Clone this project
- Run
npm install
This project takes two commandline flags:
--target
: accepts an absolute filesystem path to scan, if not provided scans itself--quiet
: disables all logging for programmatic usage
Scan a local project quietly
node ~/Projects/node-require-challenge --target ~/Projects/some-other-project --quiet
If you need a sample project to test this on, feel free to use my mucks project.