Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SassC to compile Sass #2176

Merged
merged 4 commits into from
May 18, 2015
Merged

Use SassC to compile Sass #2176

merged 4 commits into from
May 18, 2015

Conversation

boffbowsh
Copy link
Contributor

Relies on a fork at the moment, hoping to have the change merged upstream: sassc-rails Gem not been released yet, relies on a bugfix in master only: sass/sassc-rails#17

I've compared the output of both engines in :expanded mode. It's not the easiest diff in the world to review, but it does seem to be mostly whitespace, wrapping of long selectors and leading zeroes, e.g. .5em versus 0.5em: https://gist.github.com/boffbowsh/28da0cdd02022b26eada. < is ruby Sass, > is SassC.

Speedup on my laptop is 47s versus 3m11s.

Relies on a fork at the moment, hoping to have the change merged upstream: sass/sassc-rails#17
end
end

Sprockets::Base.send(:prepend, Extensions::Sprockets::Engines)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit gross, but I assume there's no better way?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have mentioned, this is the current recommended workaround from sass/sassc-rails#6 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth a comment, or at least adding to the commit message?

@elliotcm
Copy link
Contributor

👍

boffbowsh added a commit that referenced this pull request May 18, 2015
@boffbowsh boffbowsh merged commit b5dc153 into master May 18, 2015
@boffbowsh boffbowsh deleted the use-sassc-for-assets branch May 18, 2015 09:24
@@ -67,7 +67,8 @@ else
end

gem 'sass', '3.4.9'
gem 'sass-rails'
gem 'sass-rails' # required by bootstrap-sass, but not listed as a dependency of it
gem 'sassc-rails', github: 'bolandrm/sassc-rails', branch: 'master'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgive my possible misunderstanding on how Gemfiles and Gemfile.locks work but if the master branch changes on this repo is there a chance that we will get that when we bundle? Would it be safer to point this at a sha rather than a branch?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot @edds.

We'd have to bundle update to change the version, and the lock file would change and need to be checked in to take effect. In theory that means both the committer and the reviewer would be encouraged to ask "why is this?", but it would definitely be better to specify a tag or a sha here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, hopefully this is a short-term thing, the gem should be released at some point soon at which point we can point it at a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants