-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (44 loc) · 960 Bytes
/
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
.DEFAULT_GOAL := build
.PHONY: build
BIN := ./node_modules/.bin
JEST = $(BIN)/jest
NEST = $(BIN)/nest
TS_NODE = $(BIN)/ts-node
TYPEORM = ./node_modules/typeorm/cli.js
TYPEORM_SEEDING = ./node_modules/typeorm-seeding/dist/cli.js
ORM_CONFIG = ./src/ormconfig.ts
build:
$(NEST) build
test-debug:
node \
--inspect-brk \
-r tsconfig-paths/register \
-r ts-node/register \
$(JEST) \
--runInBand
migrations-create:
$(TS_NODE) \
-r tsconfig-paths/register \
$(TYPEORM) \
--config src/ormconfig.ts \
migration:create -- -n
migrations-run:
$(TS_NODE) \
-r tsconfig-paths/register \
$(TYPEORM) \
--config $(ORM_CONFIG) \
migration:run
seed-config:
$(TS_NODE) \
--project ./tsconfig.json \
-r tsconfig-paths/register \
$(TYPEORM_SEEDING) \
--configName $(ORM_CONFIG) \
config
seed-run:
$(TS_NODE) \
--project ./tsconfig.json \
-r tsconfig-paths/register \
$(TYPEORM_SEEDING) \
--configName $(ORM_CONFIG) \
seed