forked from ananthakumaran/paisa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
84 lines (63 loc) · 1.96 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
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
79
80
81
82
83
84
.PHONY: docs
.PHONY: fixture/main.transactions.json
develop:
./node_modules/.bin/concurrently --names "GO,JS" -c "auto" "make serve" "npm run dev"
serve:
./node_modules/.bin/nodemon --signal SIGTERM --delay 2000ms --watch '.' --ext go,json --exec 'go run . serve || exit 1'
debug:
./node_modules/.bin/concurrently --names "GO,JS" -c "auto" "make serve-now" "npm run dev"
serve-now:
./node_modules/.bin/nodemon --signal SIGTERM --delay 2000ms --watch '.' --ext go,json --exec 'TZ=UTC go run . serve --now 2022-02-07 || exit 1'
watch:
npm run "build:watch"
docs:
mkdocs serve -a 0.0.0.0:8000
sample:
go build && ./paisa init && ./paisa update
publish:
nix develop --command bash -c 'mkdocs build'
parser:
npm run parser-build-debug
lint:
./node_modules/.bin/prettier --check src
npm run check
test -z $$(gofmt -l .)
regen:
go build
unset PAISA_CONFIG && REGENERATE=true TZ=UTC bun test tests
jstest:
bun test --preload ./src/happydom.ts src
go build
unset PAISA_CONFIG && TZ=UTC bun test tests
jsbuild:
npm run build
test: jsbuild jstest
go test ./...
windows:
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CXX=x86_64-w64-mingw32-g++ CC=x86_64-w64-mingw32-gcc go build
deploy:
fly scale count 2 --region lax --yes
docker build -t paisa . --file Dockerfile.demo
fly deploy -i paisa:latest --local-only
fly scale count 1 --region lax --yes
install:
npm run build
go build
go install
fixture/main.transactions.json:
cd /tmp && paisa init
cp fixture/main.ledger /tmp/main.ledger
cd /tmp && paisa update --journal && paisa serve -p 6500 &
sleep 1
curl https://localhost:6500/api/transaction | jq .transactions > fixture/main.transactions.json
pkill -f 'paisa serve -p 6500'
generate-fonts:
bun download-svgs.js
node generate-font.js
node2nix:
npm install --lockfile-version 2
node2nix --development -18 --input package.json \
--lock package-lock.json \
--node-env ./flake/node-env.nix \
--composition ./flake/default.nix \
--output ./flake/node-package.nix