-
Notifications
You must be signed in to change notification settings - Fork 1
/
justfile
78 lines (71 loc) · 1.89 KB
/
justfile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Declaratively set shell recipes a.k.a commands should run in
set shell := ["bash", "-uc"]
# Load environment variables
set dotenv-load := true
# apikey:
# echo " from .env"
# set positional-arguments := true
# foo:
# echo justinit
# echo
# Colours
RED:= "\\033[31m"
GREEN:= "\\033[32m"
YELLOW:= "\\033[33m"
BLUE:= "\\033[34m"
MAGNETA:= "\\033[35m"
CYAN:= "\\033[36m"
WHITE:= "\\033[37m"
BOLD:= "\\033[1m"
UNDERLINE:= "\\033[4m"
INVERTED_COLOURS:= "\\033[7m"
RESET := "\\033[0m"
NEWLINE := "\n"
# Recipes
default:
@#This recipe will be the default if you run just without an argument, e.g list out available commands
@just --list --unsorted --list-heading $'{{BOLD}}{{GREEN}}Available recipes:{{NEWLINE}}{{RESET}}'
install *PACKAGES:
@npm install {{PACKAGES}}
update:
@npm update
compile:
@npm run compile
compile-watch:
@just _bold_red "Watching for changes to contracts and auto-compiling"
@npm run compile-watch
deploy-localhost:
@npm run deploy-localhost
deploy-testnet:
@npm run deploy-testnet
verify-testnet:
@npm run verify-testnet
test:
@npm run test
test-watch:
@just _bold_red "Watching for changes to tests and auto-testing"
@npm run test-watch
lint:
@npm run lint
start:
@#Start a local hardhat blockchain instance localhost:8545
@npm run node
format:
@npm run format
coverage:
@hardhat coverage
audit:
@npm run audit
print-audit:
@npm run print-audit
print-gas-usage:
@npm run print-gas-usage
print-deployments:
@cat deployments/deploy.ts
clean:
@just _bold_red "WARNING: this operation will delete the contracts, caches etc and reset this repo to a blank state for starting a new solidity project. This operation can't be undone."
@just _bold_red "Would you like to proceed?"
@./scripts/clean.sh
_bold_red message:
@#Hidden recipes have _ in front, i.e these can be helpers such as pretty printer below
@echo -e "{{BOLD}}{{RED}}{{message}}{{RESET}}"