-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
64 lines (44 loc) · 1.51 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
all: buildAssets server rollup
clean:
@echo "clean previous build..."
@rm -rf dist
buildAssets: copyStatics copyTemplates buildIcons
copyStatics:
@echo "copy clients/assets to dist/assets..."
@mkdir -p dist
@cp -r ./clients/assets/* dist
@echo "copy ofa/ui assets..."
@cp -r ./node_modules/@one-for-all/ui/dist/images/* dist/images
copyTemplates: clients/templates/*
@echo "copy clients/templates/* to dist/templates..."
@mkdir -p dist
@cp -r ./clients/templates dist
buildIcons:
@echo "build icons..."
@node -e 'require("./scripts/svg-to-sprite").generateSprite()'
server: startHomeServer startPortalServer
startHomeServer: buildHome
./bin/home -c config.yaml
startPortalServer: buildPortal
./bin/portal -c config.yaml
buildPortal:
@echo "build portal web server..."
@go build -o ./bin/portal server/cmd/portal/main.go
buildHome:
@echo "build home web server..."
@go build -o ./bin/home server/cmd/home/main.go
rollup:
./node_modules/.bin/rollup -c rollup.config.js -w
bundleHome:
./node_modules/.bin/rollup -c rollup.config.js -w --input home
bundleAppLand:
./node_modules/.bin/rollup -c rollup.config.js -w --input appLand
bundlePortal:
./node_modules/.bin/rollup -c rollup.config.js -w --input portal
bundleMobile:
./node_modules/.bin/rollup -c rollup.config.js -w --input mobile
home: buildAssets startHomeServer bundleHome
appLand: buildAssets startHomeServer bundleAppLand
portal: buildAssets startPortalServer bundlePortal
mobile: buildAssets startHomeServer bundleMobile
build: buildAssets