npm install
npm run buildSet DYNAJS_HOME to the repository root before using ./dynajs:
export DYNAJS_HOME=/path/to/repo
ln -s /path/to/repo/dynajs ~/bin/dynajs # or what ever PATHSet DYNAJS_OPTIONS and run your usual command through dynajs:
DYNAJS_OPTIONS='--analysis ./samples/TraceAll.js' dynajs node target.js
DYNAJS_OPTIONS='--analysis ./samples/TraceAll.js' dynajs npm run test
DYNAJS_OPTIONS='--analysis ./samples/TraceAll.js --partial' dynajs node target.js
./dynajs-legacy keeps the previous CLI for direct instrument / analyze
commands:
./dynajs-legacy instrument input.js
./dynajs-legacy analyze -a samples/TraceAll.js input.jsStandalone instrument mode is not currently supported through the new
./dynajs entrypoint.
Use the watch command below while developing the legacy CLI implementation:
npm run start:watch -- instrument --verbose <js file>Warning
The watch mode does not update dist/ directory. Run npm run build before
using ./dynajs or ./dynajs-legacy after modifying the source code.
You can run the test suite with the following command:
./run-tests.shTo run npm-based workflows with dynajs, use the new wrapper style:
DYNAJS_OPTIONS='--analysis ./samples/TraceAll.js' ./dynajs npm run testIf you want to turn on watching mode for tests, you can use:
./run-tests.sh --watchor
./run-tests.sh -WIf you want to update expected outputs for tests, you can use:
./run-tests.sh --updateor
./run-tests.sh -UIt is based on pytest, so you can also use any
pytest options. If you want to see more options, you can run:
./run-tests.sh --help