Open toburger opened 9 years ago
I am good with the idea but I don't know SASS or any of the .net implementation. Do you used any sass library in .net? Otherwise I think to use libsass-net.
I think the libsass-net wrapper ist the best solution on .NET so far. I don't know of any purely native .NET lib which is able to generate SASS/SCSS at the moment.
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. We should use the .net wrapper around the c library imo. Which I think its libgit.net right?
Sent from my Windows Phone
From: Tobias Burgermailto:notifications@github.com Sent: ý21/ý01/ý2015 07:52 To: Code52/pretzelmailto:pretzel@noreply.github.com Subject: Re: [pretzel] Support Sass for CSS generation (#192)
I think the libsass-net wrapper ist the best solution on .NET so far. I don't know of any purely native .NET lib which is able to generate SASS/SCSS at the moment.
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?
— Reply to this email directly or view it on GitHubhttps://github.com/Code52/pretzel/issues/192#issuecomment-70797596.
I'd look at https://www.nuget.org/packages/libsassnet - seems a reasonable standalone solution.
internet high five for @darrenkopp goes here
:thumbsup: :100:
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.
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. I will review it ASAP.
Jekyll allows besides Less the use of Sass to generate CSS files. It would be nice if pretzel supports it likewise.