-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevelopment.sh
More file actions
executable file
·40 lines (31 loc) · 1.33 KB
/
development.sh
File metadata and controls
executable file
·40 lines (31 loc) · 1.33 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
#!/usr/bin/env bash
black() { IFS= ; while read -r line; do echo -e '\e[30m'$line'\e[0m'; done; }
red() { IFS= ; while read -r line; do echo -e '\e[31m'$line'\e[0m'; done; }
green() { IFS= ; while read -r line; do echo -e '\e[32m'$line'\e[0m'; done; }
yellow() { IFS= ; while read -r line; do echo -e '\e[33m'$line'\e[0m'; done; }
blue() { IFS= ; while read -r line; do echo -e '\e[34m'$line'\e[0m'; done; }
purple() { IFS= ; while read -r line; do echo -e '\e[35m'$line'\e[0m'; done; }
cyan() { IFS= ; while read -r line; do echo -e '\e[36m'$line'\e[0m'; done; }
white() { IFS= ; while read -r line; do echo -e '\e[37m'$line'\e[0m'; done; }
if ! command -v sbt &> /dev/null
then
echo "sbt: could not be found"
echo "Follow: https://docs.scala-lang.org/scala3/getting-started.html"
echo "Then: \`$ cs setup\`"
exit
fi
if ! command -v yarn &> /dev/null
then
echo "yarn: could not be found"
echo "Recommended setup: https://volta.sh/"
echo "Official setup: https://nodejs.org/en/download/"
exit
fi
(cd modules/frontend || exit; yarn install)
clear
echo "🎉 Everything ready - Starting development services"
# End all in the process group on termination
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
(sbt --client "~frontend/fastLinkJS" | blue) &
(cd modules/frontend || exit; yarn run dev) &
wait