Development follows these processes outlined in development process
Git clone, then from the project root execute
To retrieve the project dependencies and before any further tasks will run correctly
npm ci
To enable Husky commit hooks to trigger the lint-staged behaviour of formatting and linting the staged files prior
before committing, prepare your repo with prepare
.
npm run prepare
npm run build
npm test
If you make changes that don't get picked up then add a clean into the process
npm run clean
npm run build
npm test
If you want to avoid using the convience scripts, then you can execute against Hardhat directly.
Target to run all the mocha tests found in the /test
directory, transpiled as necessary.
npx hardhat test
Run a single test (or a regex of tests), then pass in as an argument.
npx hardhat test .\test\sample.test.ts
The TypeScript transpiler will automatically as needed, execute through HardHat for the instantiated environment
npx hardhat run .\scripts\sample-script.ts
Logging is performed with Bunyan
To have the JSON logging output into a more human-readable form, pipe the stdout to the Bunyan CLI tool.
npx hardhat accounts | npx bunyan
To create or update the renders for the Plant UML sequence diagrams
java -version
The output will vary depending on OS, however if it fails claiming Java is not found, then you must install before proceeding.
npm run plant