-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
74 lines (49 loc) · 1.54 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
PORT = "4001"
client = "js-react"
server = "js-node"
include clojure-ring/Makefile
## CLIENT :: js-react
js-react/node_modules:
cd js-react && npm install
js-react: js-react/node_modules
cd js-react && \
REACT_APP_API_HOST=http://localhost:$(PORT) \
npm start
## CLIENT :: js-react-native
js-react-native/.env:
echo "API_HOST=http://localhost:$(PORT)" > $@
js-react-native/ios/Pods:
cd js-react-native/ios && pod install
js-react-native/ios: js-react-native/.env js-react-native/node_modules js-react-native/ios/Pods
cd js-react-native && \
yarn ios &
js-react-native/node_modules:
cd js-react-native && yarn
js-react-native: js-react-native/ios
## SERVER :: GO
go: go.watch
go.watch:
watcher -cmd="make go.run" -keepalive -list -startcmd go/
go.run:
cd go && go get && PORT=$(PORT) go run .
## SERVER :: js-node
js-node/node_modules:
cd js-node && npm install
js-node: js-node/node_modules
PORT=$(PORT) ./node_modules/.bin/nodemon --watch js-node js-node/src/api.js
## SERVER :: ruby-rails
ruby-rails.bundle:
cd ruby-rails && bin/bundle install
ruby-rails: ruby-rails.bundle
cd ruby-rails && bin/bundle exec rails s -p $(PORT)
## Administration
format:
prettier-standard ./{js-react,js-react-native,js-node}/src/**/*.js
node_modules:
npm install
start: node_modules
./node_modules/.bin/concurrently \
--names "$(client),$(server)" \
-c "magenta.bold,green.bold" \
"make $(client)" "make $(server)"
.PHONY: format go js-react js-react-native js-react-native/ios js-react-native/android js-node start js-react-native/ios/Pods