Last Updated: November 26, 2016
·
1.042K
· ccurtisj

Script to rename all deprecated .css.sass files to .sass

If you follow Rails tradition and name your SASS files foo.css.sass, you may have noticed some deprecation warnings on compilation after upgrading sass-rails.

The extra .css has been deprecated and won't be supported in future versions of Sprockets.

Random? Maybe. Worth crying about? Nah. Here's a bash script to handle the otherwise painful rename.

#!/bin/sh
for file in $(find ./app/assets/stylesheets/ -name "*.css.sass")
do
    git mv $file `echo $file | sed s/\.css//`
done

shared via http://stackoverflow.com/questions/27537437/upgraded-to-scss-rails-gem-gives-deprecation-warning