This script helps you start your development by opening your project in vscode, its github repository and optionally slack.
work react
- Navigate to
usr/local/bin
in terminal - Create the file:
touch work
- Open the file:
open work
- Paste in the code at the end of the gist
- Now do
chmod +x work
- You're done!
If you want to launch slack after starting up, simply run work myProject slack
workdir=$(mdfind -literal "kMDItemDisplayName == $1" | grep -v "node_modules")
code -n $workdir
cd $workdir
url="https://github.$(git config remote.origin.url | cut -f2 -d.)"
open /Applications/Google\ Chrome.app $url
if [ $2 -a $2 = "slack" ]
then
open /Applications/Slack.app
fi