-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
102 lines (71 loc) · 2.23 KB
/
Copy pathMakefile
File metadata and controls
102 lines (71 loc) · 2.23 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Makefile for district development
#
# Requirements:
#
# - node (Javascript Desktop Virtual Machine)
# - yarn (NodeJS Package Manager)
# - clj (Clojure CLI Tool)
# - solc (Solidity Contract Compiler)
.PHONY: init
.PHONY: dev dev-ui dev-server
.PHONY: build-server build-ui build-dist build
.PHONY: build-contracts
.PHONY: watch-node-log
.PHONY: webpack
.PHONY: test deps clean help
help:
@echo "Commands:"
@echo " init :: Run on first-time setup"
@echo ""
@echo " dev :: Main Development Repl [Recommended]"
@echo " dev-ui :: Start Figwheel Development for UI only"
@echo " dev-server :: Start Figwheel Development for Server only"
@echo ""
@echo " build :: Make Production Build for Server and UI"
@echo " build-ui :: Make Production Build for UI only"
@echo " build-server :: Make Production Build for Server only"
@echo " build-contracts :: Compile Solidity Contracts"
@echo " build-dist :: Prepare ./dist folder for Production Build"
@echo ""
@echo " watch-node-log :: Watches development node server log"
@echo ""
@echo " webpack :: Build Webpack Bundle for UI"
@echo ""
@echo " deps :: Install Dependencies"
@echo " clean :: Clean out build artifacts for all builds"
@echo ""
@echo " test :: Run Server Test Runner"
@echo ""
@echo " help :: Display this help message"
init: clean deps webpack build-contracts
dev:
clj -A:dev -R:deps-ui
dev-ui:
clj -A:fig-dev-ui -R:deps-ui
dev-server:
clj -A:fig-dev-server
build-server:
clj -A:build-prod-server
build-ui:
clj -A:build-prod-ui -R:deps-ui
build-contracts:
@echo "Generating Solidity Contracts..."
make -C ./resources/public/contracts/src
build-dist:
cp -R ./resources ./dist/
sed -i "s/dev-ui-main.js/build-prod-ui-main.js/g" ./dist/resources/public/index.html
cp -R ./node_modules ./dist/
build: clean deps webpack build-contracts build-server build-ui build-dist
watch-node-log:
tail -f ./target/node/dev-server/node.log
webpack:
yarn webpack --config ./src/webpack/ui.config.js
deps:
yarn install
clean:
rm -rf node_modules
rm -rf target
rm -rf dist
make -C ./resources/public/contracts/src clean
test:
clj -A:test-server