-
Notifications
You must be signed in to change notification settings - Fork 163
Support Sass for CSS generation #192
Comments
I am good with the idea but I don't know SASS or any of the .net implementation. |
I think the libsass-net wrapper ist the best solution on .NET so far. BundleTransformer.SassAndScss is using IronRuby to compile SASS/SCSS to CSS, which is in a way "native". But I don't know if it's worth taking a dependency on IronRuby? |
My understanding is a lot of effort is being put into libsass which is a c implementation of the ruby version. Sent from my Windows Phone From: Tobias Burgermailto:[email protected] I think the libsass-net wrapper ist the best solution on .NET so far. BundleTransformer.SassAndScsshttp://www.nuget.org/packages/BundleTransformer.SassAndScss is using IronRuby to compilehttp://bundletransformer.codeplex.com/SourceControl/latest#BundleTransformer.SassAndScss/Compilers/SassAndScssCompiler.cs SASS/SCSS to CSS, which is in a way "native". But I don't know if it's worth taking a dependency on IronRuby? — |
I'd look at https://www.nuget.org/packages/libsassnet - seems a reasonable standalone solution. |
internet high five for @darrenkopp goes here |
👍 💯 |
This is actually fairly easy to do with libsassnet. It's primarily copy&paste the LessTransform.cs and put in libsassnet calls. The issue is with ILMerge and the non-IL binary (LibSass.x86.dll) - it can't embed it and have a funtime with the current build script. There may be ways around that. I know Fody/Costura work pretty well for those things, which I've switched to but having other issues around MEF. |
Solves Code52#192 - introduces Sass for CSS generation. Uses Libsassnet to provide the Sassyness. Switches out ILMerge for Fody/Costura. When handling unmanaged assemblies, this is the best solution. This required some modifications to how MEF was used. It uses a very specific version of Fody/Costura because of issues with VS15, I think. Please don't update it.
So, here's what's going to happen to libsass soon, and I think it solves your concerns (and those in the other commit, but not 100% sure). Currently the way libsass works is a plain ol' clr assembly (libsassnet.dll) which references a managed c++ assembly (libsass.*.dll). I've been working with the libsass team to have official windows dll's for libsass which I will start using (currently libsassnet is even 1 version behind because of a managed c++ limitation with C classes). So, the idea moving forward is to use the official windows version (hopefully doesn't require visual c++ redistributable as well, but not 100% sure on this) and just p/invoke into it. There are a few benefits here:
Anyway, sorry it's taking so long, kind of waiting for the official windows driver to get released so I don't have to try to replicate all the work they did, but it hasn't come out yet. |
That's awesome! The PR with libsass works fine switching to Fody/Costura instead of ILMerge, so for Windows thats solved. My view is get the Windows version working and worry about any special 'features' for Linux. "Worst case" I hear Jekyll/ruby work okay on those platforms ;) The mono issue is completely separate from libsass - it's simply not loading its own assemblies. |
@vikingcode Curious to know if the fix is closer to being merged. |
@nayanshah No idea why it wasn't merged or if there were any outstanding issues other than it doesn't run on mono, which technically pretzel at the time didn't do anyway (and didn't until July/August). You'd have to ask the maintainers, as I no longer care. |
I wouldn't expect libsass-net to work on mono since it uses visual c++ but
I'm no mono expert.
|
@vikingcode Sorry, I don't know why I was thinking that you wanted to wait before merging the PR. |
Jekyll allows besides Less the use of Sass to generate CSS files.
It would be nice if pretzel supports it likewise.
The text was updated successfully, but these errors were encountered: