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 |