Skip to content

Commit

Permalink
improve(package): Script target for clean
Browse files Browse the repository at this point in the history
Also, having typechain output is a pre-requisite for the `build` target,
so add a hook for typechain to run if the typechain dir does not exist.
  • Loading branch information
pxrl committed Jun 12, 2023
1 parent 2b63cc1 commit fe0a837
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
"types": "dist/index.d.ts",
"main": "dist/index.js",
"scripts": {
"clean": "for dir in dist node_modules typechain; do mv \"${dir}\" \"_${dir}\" 2>/dev/null; rm -rf \"_${dir}\" & done",
"compile-zksync": "COMPILE_ZK=true yarn hardhat compile",
"lint-contracts": "yarn solhint ./contracts/**/*.sol",
"lint": "yarn prettier --list-different",
"lint-fix": "yarn prettier --write",
"prettier": "prettier .",
"build": "hardhat compile && tsc && rsync -a --include '*/' --include '*.d.ts' --exclude '*' ./typechain ./dist/",
"build": "[ -d typechain ] || yarn generate-contract-types && hardhat compile && tsc && rsync -a --include '*/' --include '*.d.ts' --exclude '*' ./typechain ./dist/",
"test": "hardhat test",
"test:report-gas": "REPORT_GAS=true hardhat test",
"test:gas-analytics": "GAS_TEST_ENABLED=true hardhat test ./test/gas-analytics/*",
Expand Down

0 comments on commit fe0a837

Please sign in to comment.