Skip to content

Instantly share code, notes, and snippets.

@cupnoodle
Created November 24, 2020 17:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cupnoodle/493323d5ba7cf6eca3e0f4b6baa3471c to your computer and use it in GitHub Desktop.
Save cupnoodle/493323d5ba7cf6eca3e0f4b6baa3471c to your computer and use it in GitHub Desktop.
AppleScript to run your rails server and webpack dev server
tell application "Terminal"
activate
do script "cd ~/Repository/path-to-your-rails-app; rails server" in tab 1 of front window
my makeTab()
do script "cd ~/Repository/path-to-your-rails-app; ./bin/webpack-dev-server" in selected tab of front window
end tell
on makeTab()
tell application "System Events" to keystroke "t" using {command down}
delay 0.2
end makeTab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment