-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile
80 lines (54 loc) · 1.36 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
app=app
bin=vendor/bin
node=node_modules/.bin
prettier-pattern="**/*.{css,js,json,md,ts}"
temp=temp
tests=tests
ts-webpack=$(node)/cross-env TS_NODE_PROJECT='webpack/tsconfig.json' TS_NODE_TRANSPILE_ONLY=true
webpack=webpack
dirs:=bin $(app) $(tests)
# Setup
install:
composer install
autoload:
composer dump-autoload
build:
$(ts-webpack) NODE_ENV=production $(node)/webpack --config $(webpack)/webpack.prod.ts --progress
dev:
$(ts-webpack) $(node)/webpack serve --config $(webpack)/webpack.dev.ts
rm-cache:
rm -rf $(temp)/cache
reset: rm-cache autoload
serve:
NETTE_DEBUG=1 php -S 0.0.0.0:8000 -t www
# Tests
test:
$(bin)/tester -s -p php --colors 1 -C $(tests)/cases
test-coverage:
$(bin)/tester -s -p phpdbg --colors 1 -C -d extension=xdebug.so --coverage $(temp)/coverage.xml --coverage-src $(dirs)
# QA
codefixer:
$(bin)/codefixer $(dirs)
codesniffer:
$(bin)/codesniffer $(dirs)
phpstan:
$(bin)/phpstan analyse
prettier:
$(node)/prettier --check $(prettier-pattern)
prettier-fix:
$(node)/prettier --write $(prettier-pattern)
ts:
$(node)/tsc --noEmit --project tsconfig.json
fix-php: reset codefixer
fix-ts: prettier-fix
fix: fix-php fix-ts
qa-php: codesniffer phpstan
qa-ts: ts prettier
qa: codesniffer phpstan ts prettier
# Deploy
deploy:
npm ci
make build
composer install --prefer-dist -o --no-dev
bin/console migrations:continue
rm -rf temp/*