Created
April 23, 2020 23:30
-
-
Save daviseford/c40fa8b45a268917b22f84684a78a1b2 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
# Replace this with the path to your repository | |
REPOSITORY_DIR=/Users/davisford/Documents/sample-react-jupyterlab-extension | |
# Replace with the name of your conda environment | |
CONDA_ENV=jl-extension-env | |
# Helper function. | |
# Opens a new tab and executes a command in iTerm2 | |
# Credit: https://apple.stackexchange.com/questions/110778/open-new-tab-in-iterm-and-execute-command-there | |
newtabi(){ | |
osascript \ | |
-e 'tell application "iTerm2" to tell current window to set newWindow to (create tab with default profile)'\ | |
-e "tell application \"iTerm2\" to tell current session of newWindow to write text \"${@}\"" | |
} | |
# Open a new tab and start running the local web dev server | |
newtabi "conda activate ${CONDA_ENV} && cd ${REPOSITORY_DIR} && yarn watch" | |
# Open another new tab and open up JupyterLab | |
newtabi "conda activate ${CONDA_ENV} && cd ${REPOSITORY_DIR} && jupyter lab --watch" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment