Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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/
@hypeJunction

This comment has been minimized.

Copy link

commented Oct 28, 2017

Line 12 was causing problems for me, I changed it to:
find ./public/stylesheets/scss -name "*.scss" | xargs sed -i 's/\.sass//g'

@hypeJunction

This comment has been minimized.

Copy link

commented Oct 28, 2017

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
You can’t perform that action at this time.