Skip to content

Instantly share code, notes, and snippets.

@kavanagh
Created June 20, 2013 16:43
Show Gist options
  • Save kavanagh/5824400 to your computer and use it in GitHub Desktop.
Save kavanagh/5824400 to your computer and use it in GitHub Desktop.
function to quickly make an interactive job
# 's' below refers to symlinked sublime
# all refers to 'testem' remove this if you dont need it
function job() {
if [[ -z "$1" ]]; then
echo "You must specify a project name!"
return;
fi
mkdir $1 && cd $1 && yo ig-job && s . && s ./app/scripts/main.js && s ./app/scripts/config.js && \
osascript -e 'tell application "Terminal" to activate' -e 'tell application "System Events" to tell process "Terminal" to keystroke "t" using command down' -e 'tell application "Terminal" to do script "cd '$PWD' && testem" in selected tab of the front window' && \
grunt server;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment