Created
May 15, 2018 13:35
-
-
Save jasper-lyons-rhul/2b4c1e0c891be869858328ac4624de26 to your computer and use it in GitHub Desktop.
Reload firefox window on mac os
This file contains 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
fswatch -x --event Updated ./templates | while read file event ; do | |
if [[ $file = *".mjml" ]]; then | |
file_name=${file%.mjml}".html" | |
mjml $file > $file_name | |
osascript -e ' | |
set previous to (path to frontmost application) | |
tell application "Firefox Developer Edition" | |
activate | |
tell application "System Events" to keystroke "r" using command down | |
end tell | |
tell application (previous as text) | |
activate | |
end tell | |
' | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment