Skip to content

Instantly share code, notes, and snippets.

@v-sorokin
Forked from knowuh/convert_sass_to_scss
Created October 29, 2015 13:00
Show Gist options
  • Save v-sorokin/7903de98c6c1c3713a9a to your computer and use it in GitHub Desktop.
Save v-sorokin/7903de98c6c1c3713a9a to your computer and use it in GitHub Desktop.
convert sass to scss by example
#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/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment