-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
82 lines (62 loc) · 1.17 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#================================
#== DOCKER ENVIRONMENT
#================================
COMPOSE := docker-compose
dcb:
${COMPOSE} build
dcbuf:
ifdef f
${COMPOSE} up -d --build --${f}
endif
dcuf:
ifdef f
${COMPOSE} up -d --${f}
endif
dcu:
${COMPOSE} up -d --build
dcd:
${COMPOSE} down
kdmig:
ifdef type
${COMPOSE} exec app npm run ${type}
endif
kdrun:
${COMPOSE} exec app npm run krun
#############################
# Application Teritory
#############################
NPM := npm
dev:
${NPM} run dev
prod:
${NPM} start
build:
${NPM} run build
test:
${NPM} test
install: npm.o build.o
npm.o:
${NPM} ci
build.o:
${NPM} run build
#############################
# Knex Database Teritory
#############################
NPX := npx
KNEX := knex
kmakem:
ifdef name
${NPX} ${KNEX} --cwd src/configs --knexfile knexfile migrate:make ${name}
endif
kmakes:
ifdef name
${NPX} ${KNEX} --cwd src/configs --knexfile knexfile seed:make ${name}
endif
kmig:
ifdef type
${NPX} ${KNEX} --cwd src/configs --knexfile knexfile migrate:${type}
endif
krun:
${NPX} ${KNEX} --cwd src/configs --knexfile knexfile seed:run
klist:
${NPX} ${KNEX} --cwd src/configs --knexfile knexfile migrate:list