-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (35 loc) · 1.46 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
SHELL := /bin/bash
-include .env
.PHONY: init typecheck clean lint test test.watch test.cov test.debug test.e2e pre-commit pre-push build lint-stg start start.dev start.debug start.debug.open start.prod up.dev build.prod up.prod clear.prod encrypt.prod
all: init clean typecheck
init:; npm i
typecheck :; npx tsc --noEmit --project tsconfig.json
clean :; rm -rf dist
lint :; npx eslint \{src,apps,libs,test\}/**/*.ts --fix
test :; npx jest --passWithNoTests
test.watch :; npx jest --passWithNoTests --watch
test.cov :; npx jest --passWithNoTests --coverage
test.debug :; node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand
test.e2e:; npx jest --config ./jest-e2e.config.ts
pre-commit: typecheck lint-stg
pre-push : lint typecheck test
build:; npx nest build
lint-stg :; npx lint-staged
start:; npx nest start
start.dev:; npx nest start --watch
start.debug:; npx nest start --debug --watch
start.debug.open:; npx nest start --debug 0.0.0.0 --watch
start.prod:; node dist/main
# docker aliases
up.dev:
@docker compose up -d && 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
# encryption setup
encrypt.prod:
@npx dotenvx encrypt -f conf/.production.secrets.env
-include ${FCT_PLUGIN_PATH}/makefile-external