Created
November 24, 2020 17:52
-
-
Save cupnoodle/493323d5ba7cf6eca3e0f4b6baa3471c to your computer and use it in GitHub Desktop.
AppleScript to run your rails server and webpack dev server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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