This repository has been archived by the owner on Jun 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Conversation
This file contains 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
+1 |
1 similar comment
+1 |
+1 |
The fixes for the C sass_interface have landed: https://github.com/hcatlin/libsass/releases/tag/v2.0. Maybe also check sass/node-sass#332 for a small overview of the newly available features. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
I'm making this pull request just to make you aware of these changes. You can pick and choose what you want and I can re-submit. I did a couple things. The ffi bindings were out of date so I updated them to work with latest version of libsass. I didn't notice the other pull request #5 also did this until I wrote my code. It looks like we did approximately the same thing.
I added custom function support. This depends on this patch for libsass: sass/libsass#181. I did this by exposing all the
Sass_Value
types and writing code to convert between them and ruby. It would be nice to merge that patch into libsass. (I have my own version that only adds custom function support with no other changes so if that's preferred I can submit that as a pull request)The custom function interface is pretty basic, it mimics the libsass api instead of the ruby sass one but all the groundwork is there to make it match ruby sass's api.
It looks like this:
You can see more examples of the type conversion in the specs: https://github.com/hcatlin/sassruby/pull/7/files#diff-72f0204d5517b4f250f5e2cdf312dac0R120
I wrote specs for all code I added and specs for basic execution which were missing.
Lastly, I noticed some
.bundle
variant of libsass was hardcoded into theSassC::Lib
. I renamed the referenced library to just sass which means that it should load the library installed in the system (of any platform). I'm not too familiar with what is preferred for native extensions, the extconf stuff didn't work anyway when installing the gem because it didn't know how to check out the submodule.Lastly I made it run on ruby 1.8 becuase that's what we currently use. Just a few minor changes.
sassruby speeds up asset compilation for our deploys by minutes so I'd love to see this code be available for more developers.
Thanks