Created
September 2, 2011 20:03
-
-
Save knowuh/1189728 to your computer and use it in GitHub Desktop.
convert sass to scss by example
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
#convert .sass files to scss files: | |
bundle exec sass-convert -R --from sass --to scss ./public/stylesheets/sass/ | |
# delete the old sass files: | |
find ./public/stylesheets/sass -name "*.sass" | xargs rm | |
# rename the directory. | |
mv ./public/stylesheets/sass ./public/stylesheets/scss | |
# replace local @imports what include the .sass extension | |
find ./public/stylesheets/scss -name "*.scss" | xargs sed -i "" 's/\.sass//g' | |
#ensure that we got them all | |
grep -R "@import" ./public/stylesheets/scss | |
bundle exec compass compile \ | |
--sass-dir public/stylesheets/scss/ --css-dir public stylesheets/ |
Instead of moving and deleting you can also use:
bundle exec sass-convert -R --from sass --to scss ./public/stylesheets/sass/ ./public/stylesheets/scss
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 12 was causing problems for me, I changed it to:
find ./public/stylesheets/scss -name "*.scss" | xargs sed -i 's/\.sass//g'