Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 35 lines (23 sloc) 817 Bytes
set -e
set -u
# Start the server if not already running
tmux start-server 2> /dev/null
# Connect to a session or create a new one
tmux attach-session -d -t "$PROJECT_NAME" || {
echo "Creating a new session"
## 0: Editor
tmux new-session -d -s "$PROJECT_NAME" bash
tmux send-keys -t "$PROJECT_NAME" "$EDITOR $STARTPAGE" C-m
## 1: Shell
tmux new-window -a -t "$PROJECT_NAME" bash
## 2: Webpack
tmux new-window -a -t "$PROJECT_NAME" -n "webpack" "npm run watch"
## 3: Dev server
tmux new-window -a -t "$PROJECT_NAME" -n "devserver" "php artisan serve --host --port 8083"
tmux select-window -t "$PROJECT_NAME":0
tmux attach-session -t "$PROJECT_NAME"