Created
January 29, 2014 21:38
-
-
Save cpruitt/8697757 to your computer and use it in GitHub Desktop.
SASS watchstyle Function for .profile
This file contains hidden or 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
| # 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