Skip to content

Instantly share code, notes, and snippets.

@cpruitt
Created January 29, 2014 21:38
Show Gist options
  • Select an option

  • Save cpruitt/8697757 to your computer and use it in GitHub Desktop.

Select an option

Save cpruitt/8697757 to your computer and use it in GitHub Desktop.
SASS watchstyle Function for .profile
# Add the following to .profile
#
# From the command line, watch style.scss by running:
# $ watchstyle
#
# Watch style.scss AND REQUIRE BOOTSTRAP by running:
# $ watchstyle bootstrap
watchstyle(){
echo "Watching ./style.scss --> style.css"
if [ -z "$1" ]
then
CMD="sass --watch style.scss:style.css --style expanded"
echo "$CMD"
eval $CMD
else
case "$1" in
"bootstrap" )
CMD="sass -r bootstrap-sass --watch style.scss:style.css --style expanded" && echo "$CMD" && eval $CMD ;;
*)
echo "Unknown Option: $1 (ABORTING)" ;;
esac
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment