Uses yargs to handle command line arguments and build a CLI. No changes in behavior.
It is now possible to show docs with node ./run-tests-zkasm.js --help which prints:
run-tests-zkasm.js <path> [outfile]
the default command runs zkASM tests
Positionals:
path The zkASM file to run or a directory to search for zkASM files.
[string]
outfile If provided, results are written to this file. Otherwise they are
printed to stdout. [string]
Options:
--help Show help [boolean]
--version Show version number [boolean]
Motivation
Make usage of the script easier, for example when running it manually during development.
Facilitate handling of command line options that will be required for benchmarking.
Without a library like yargs handling options in addition to multiple positional arguments would become messy.
Uses
yargs
to handle command line arguments and build a CLI. No changes in behavior.It is now possible to show docs with
node ./run-tests-zkasm.js --help
which prints:Motivation
yargs
handling options in addition to multiple positional arguments would become messy.