generated from ZeframLou/foundry-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (32 loc) · 1.11 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# include .env file and export its env vars
# (-include to ignore error if it does not exist)
-include .env
# Install dependencies
forge-install:; forge update
blitz-install:; (cd app && yarn)
install: forge-install blitz-install
# Lint code for style hygiene
forge-lint:; npx solhint --config ./.solhint.json --fix contracts/*/**.sol contracts/*.sol
blitz-lint:; echo "blitz-lint: TODO"
lint: forge-lint blitz-lint
# Clean away build artifacts
forge-clean:; forge clean
blitz-clean:; (cd app && npm run clean)
snapshot-clean:; rm -rf .gas-snapshot
clean: forge-clean blitz-clean snapshot-clean
# Test code
forge-test:; forge test -vvv
blitz-test:; (cd app && npm run test)
test: forge-test blitz-test
# Blitz Miscs
# See: https://blitzjs.com/docs/cli-overview#available-commands
app:; (cd app && npm run build)
dev:; (cd app && npm run dev)
prod:; (cd app && npm run start)
# Forge Miscs
# See: https://github.com/gakonst/foundry/blob/master/cli/README.md#foundry-clis
contracts:; forge build
snapshot:; forge snapshot
report:; forge test --gas-report
# Stop 'make' from mistaking commands for directories
.PHONY: contracts