-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathdev.sh
More file actions
executable file
·43 lines (37 loc) · 1.11 KB
/
dev.sh
File metadata and controls
executable file
·43 lines (37 loc) · 1.11 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
#!/bin/sh
cd "$(dirname "$0")"
DIR=$(pwd)
# Usage: `./dev.sh [-e editor] [-s]`
# [-e editor] will open using your preferred editor
# [-s] will run all setup (bundle, yarn, db:migrate)
EDITOR=${1:-atom}
while [ "$1" != "" ]; do
case $1 in
-e | --editor ) shift
EDITOR=${1:-atom}
;;
-s | --setup ) SETUP=${1:-false}
;;
esac
shift
done
if [ $SETUP ]; then
$DIR/script/dev-setup
fi
if ! [ -x "$(command -v ttab)" ]; then
echo 'Error: ttab is not installed. See: https://www.npmjs.com/package/ttab' >&2
echo 'using `heroku local -f Procfile.development`'
heroku local -f Procfile.development
else
# echo 'Running rails server...'
ttab bin/rails server
# echo 'Starting heroku local to run webpack-dev-server...'
ttab heroku local webpack -f Procfile.development
ttab heroku local worker -f Procfile.development
# echo 'Opening code editor and browser...'
ttab "$EDITOR . && open http://localhost:3000"
fi
# make sure you're up to date
git fetch
# add network-react-components
git submodule update --init