-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathreact
executable file
·46 lines (42 loc) · 1.25 KB
/
react
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
#!/bin/bash
case $1 in
build)
action="npm run-script build"
;;
start)
action="npm start"
;;
*)
echo Invalid input
echo "./react [build | start] [dev | uci | home]"
exit 1
;;
esac
# Make sure to add all React config variables here
# https://create-react-app.dev/docs/adding-custom-environment-variables/
export NODE_PATH=src/
export ROOT_ENTITIY=2
case $2 in
dev)
export REACT_APP_ENV=dev
export REACT_APP_BASE_URL=https://dev-tippers.ics.uci.edu/api
export REACT_APP_OBSERVATION_ID=13
export REACT_APP_BASE_ENTITY_ID=10000
eval "$action"
;;
uci)
export REACT_APP_ENV=dev
export REACT_APP_BASE_URL=https://uci-tippers.ics.uci.edu/api
export REACT_APP_OBSERVATION_ID=1
export REACT_APP_BASE_ENTITY_ID=2
eval "$action"
;;
home)
eval "$action"
;;
*)
echo Invalid input
echo "./react [build | start] [dev | uci | home]"
exit 1
;;
esac