Install Docker. https://docs.docker.com/install/
Clone this repository and then run:
./build/build.sh
This will build an image called master-mind-wp3
on your local machine.
Run the docker container mounting your file on /tmp/file.js.
docker run \
-v ABS_PATH_TO_YOUR_FILE:/tmp/file.js \
master-mind-wp3
The runtime information will be printed to stdout.
docker run -v $(pwd)/tests/calculator/calculator.js:/tmp/calculator.js master-mind-wp3 /tmp/calculator.js
You can specify a JSON file that contains an array of blacklisted node modules which you don't want to instrument.
docker run \
-v $(pwd)/tests/calculator/calculator.js:/tmp/calculator.js \
-v PATH_TO_BLACKLIST.json:/tmp/blacklist.json
master-mind-wp3 \
/tmp/calculator.js
/tmp/blacklist.json
example-blacklist.json:
[
"lodash"
]