-
Notifications
You must be signed in to change notification settings - Fork 4
/
Justfile
36 lines (27 loc) · 900 Bytes
/
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
export TZ := "UTC"
TS_LOADER := " --import @swc-node/register/esm-register"
NODE_PARAMS := "--no-warnings " + TS_LOADER
_default:
@just --list
server *node_args="":
@node {{NODE_PARAMS}} {{node_args}} packages/server/main.ts --start
linter:
@npx @biomejs/biome check
test *args="":
@npx vitest run {{args}}
test-watch *args="":
@npx vitest watch {{args}}
build-console:
just _pre-build
@rm -rf build/console
@cd packages/console && npm run build
install:
@npm ci
########################### INFRA
# The process.env is not working on Vite Build
# This is a workaround to make it work
file_path := "./node_modules/@tago-io/sdk/out/regions.js"
_pre-build:
@sed -i'' -e 's/ process\.env\.TAGOIO_API/ window.process.env.TAGOIO_API/g' "{{file_path}}"
@sed -i'' -e 's/ process\.env\.TAGOIO_REALTIME/ window.process.env.TAGOIO_REALTIME/g' "{{file_path}}"
@echo "SDK patched"