-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (36 loc) · 1.15 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
SHELL := /bin/bash
.PHONY: init typecheck lint lint.stg test pre-commit pre-push up.dev watch build.prod up.prod clear.prod start.dev start.prod encrypt.prod
all: init typecheck
init:
@npm i
typecheck:
@npx tsc
lint:
@npx eslint src/**/*.ts test/**/*.ts
lint.stg:
@npx lint-staged
test:
@npx jest --passWithNoTests
pre-commit: typecheck lint.stg
pre-push: lint typecheck test
# docker aliases
up.dev:
@docker compose up -d && docker compose logs -f
watch:
@docker compose up -d --watch && docker compose logs -f
build.prod:
@docker compose -f docker-compose.prod.yml build
up.prod:
@docker compose -f docker-compose.prod.yml up -d && docker compose -f docker-compose.prod.yml logs -f
clear.prod:
@docker compose -f docker-compose.prod.yml down
# shortcuts for docker
start.prod:
export NODE_ENV=production && npx tsx src
start.dev:
export NODE_ENV=development && npx tsx --watch src
start.debug:; export NODE_ENV=development && npx tsx --watch --inspect-brk src
start.debug.open:; export NODE_ENV=development && npx tsx --watch --inspect-brk=0.0.0.0:9229 src
# encryption setup
encrypt.prod:
@npx dotenvx encrypt -f conf/.production.secrets.env