Created
January 27, 2018 14:52
-
-
Save rodrigobdz/c68be1310eb84dab8569f19bc75c572b to your computer and use it in GitHub Desktop.
Edit .svg files in macOS and livereload
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
#!/bin/bash | |
FILE_TO_WATCH=<PATH TO SVG> | |
filewatcher $FILE_TO_WATCH 'reload' "osascript -e 'tell application \"Safari\" to set URL of current tab of front window to \"file://$FILE_TO_WATCH\"'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Watch and Reload
Script to edit an SVG file in a text editor and preview and reload the changes on save in Safari.
Requirements
FILE_TO_WATCH
to the absolute path to your SVG file in watch-and-reload.sh.Usage
watch-and-reload.sh
script in a text editor.