-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
69 lines (55 loc) · 1.27 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
_default:
@just --list
format:
npm run format
alias f := format
lint-md:
docker run --rm -v $PWD:/workdir davidanson/markdownlint-cli2:v0.8.1 \
"**/*.md" \
"#node_modules" \
"#codebase.md"
lint:
npm run lint
just lint-md
alias l := lint
test:
npm run test
alias t := test
run:
npm run dev
build:
npm run build
alias b := build
# authenticate with gcloud using a service account
[group('infra')]
gcloud-auth saname sakeypath:
gcloud auth activate-service-account {{saname}} --key-file={{sakeypath}}
# deploy via gcloud build
[group('infra')]
deploy-cloudbuild:
gcloud builds submit --config cloudbuild.yaml src
# deploy via gcloud functions deploy command
[group('infra')]
deploy:
gcloud functions deploy get-quote \
--entry-point=getQuote \
--trigger-http \
--runtime nodejs22 \
--region=us-west2 \
--allow-unauthenticated
# compacts contents of json file
[group('utils')]
compact-json filepath:
cat {{filepath}} | jq -c
# encodes a file as base64
[group('utils')]
encode-base64 filepath:
base64 -i {{filepath}}
# generate codebase.md that is useful to feed to LLMs
[group('utils')]
ai-digest:
npx ai-digest -i src --show-output-files
# copy .env.example to .env.local
[group('utils')]
cp-env:
cp .env.example .env.local