forked from online-go/online-go.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (26 loc) · 926 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
NODE_PATH:=node_modules:$(NODE_PATH)
PATH:=node_modules/.bin/:$(PATH)
dev: node_modules .husky
npm run dev
.husky:
npx husky install
node_modules: package.json
npm ls yarn || npm install yarn
npm run yarn install
pretty prettier lint-fix:
npm run prettier
npm run lint:fix
min: minjs mincss
mincss:
npm run gulp min_styl
@echo 'gzipped ogs.min.css: ' `gzip -9 dist/ogs.min.css -c | wc -c`
minjs:
npm run webpack -- --mode production --optimization-minimize --devtool=source-map
@echo 'gzipped ogs.min.js: ' `gzip -9 dist/ogs.min.js -c | wc -c`
@echo 'gzipped vendor.min.js: ' `gzip -9 dist/vendor.min.js -c | wc -c`
analyze:
ANALYZE=true npm run analyze
#NODE_PATH=$(NODE_PATH) PATH=$(PATH) PRODUCTION=true webpack --optimization-minimize --devtool=source-map --profile --json > analyze.json
#npm run webpack-bundle-analyzer dist/ analyze.json
.PHONY: dev min minjs mincss
-include Makefile.production