Skip to content

Instantly share code, notes, and snippets.

@peterhellberg
Created April 14, 2011 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterhellberg/919416 to your computer and use it in GitHub Desktop.
Save peterhellberg/919416 to your computer and use it in GitHub Desktop.
Converting SCSS to CSS when a new file is saved.
function sass-watch {
if [ -z "$3" ]; then
SASS_IN='all.scss'
CSS_OUT='all.css'
SASS_WATCH_PATH='.'
else
SASS_IN=$1
CSS_OUT=$2
SASS_WATCH_PATH=$3
fi
puncher "echo \"[\033[1;33m\$(date +%H:%M:%S)\033[1;37m] \
\033[1;37mwrote \033[1;32m$CSS_OUT\033[1;37m\" && \
sass --scss $SASS_IN $CSS_OUT" $SASS_WATCH_PATH
}
@peterhellberg
Copy link
Author

Screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment