-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathrun.sh
executable file
·43 lines (37 loc) · 968 Bytes
/
run.sh
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
#!/usr/bin/env bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
set -eo pipefail
usage() {
echo "usage: ./run.sh start|build|outdated|lintcheck|lintfix"
echo ""
echo " start Start React dev server"
echo " build Build all static assets"
echo " outdated List npm packages that are outdated"
echo " lintcheck eslint check all the source files"
echo " lintfix Let eslint fix all source files"
echo ""
exit 1
}
[ $# -lt 1 ] && usage
case $1 in
start)
yarn run start | cat
;;
build)
yarn run build
;;
outdated)
yarn outdated
;;
lintcheck)
yarn run lint
;;
lintfix)
yarn run lint --fix
;;
*)
exec "$@"
;;
esac