Skip to content

Instantly share code, notes, and snippets.

@yusuke024
Created March 11, 2016 08:40
Show Gist options
  • Save yusuke024/5d622abcc87029c50ce6 to your computer and use it in GitHub Desktop.
Save yusuke024/5d622abcc87029c50ce6 to your computer and use it in GitHub Desktop.
#!/bin/sh
SESSION_NAME=redux
tmux has-session -t $SESSION_NAME
if [ $? != 0 ]
then
tmux new-session -s $SESSION_NAME -d
tmux send-keys -t $SESSION_NAME "webpack src/app.js dist/bundle.js -w" C-m
tmux split-window -v -t $SESSION_NAME
tmux send-keys -t $SESSION_NAME 'babel src/app.es6 -o src/app.js -w' C-m
tmux split-window -v -t $SESSION_NAME
tmux send-keys -t $SESSION_NAME "cd $PWD/dist" C-m
tmux send-keys -t $SESSION_NAME 'browser-sync start --server --files "*"' C-m
tmux split-window -v -t $SESSION_NAME
tmux select-layout -t $SESSION_NAME even-vertical
fi
tmux attach -t $SESSION_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment