Created
September 26, 2011 11:20
-
-
Save jkeyes/1242040 to your computer and use it in GitHub Desktop.
Compile LESS files when a save is detected
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 | |
watchmedo shell-command --patterns="*.less" --command=\ | |
'LESS=`echo "${watch_src_path}" | sed s/.less/.css/`; \ | |
echo compile: "${watch_src_path}";\ | |
lessc "${watch_src_path}" "${LESS}"; \ | |
if [ "$?" -eq "0" ]; then echo wrote: "${LESS}"; fi' $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment