Skip to content

Instantly share code, notes, and snippets.

@jasper-lyons-rhul
jasper-lyons-rhul / live-reload.sh
Created May 15, 2018 13:35
Reload firefox window on mac os
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