-
Notifications
You must be signed in to change notification settings - Fork 235
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
Using a better less compiler #419
Comments
Also, JavaScriptServices is xplat. |
Does that require having the Node executable available (I.e., does it "shell out" the execution)? If so, I'm a little hesitant. I'd love to keep everything as native as possible to avoid platform compatibility problems in the future. That said, I'm also not totally thrilled with DotLess... |
Yes.
Sadly, the less standard has support for executing javascript. So, nothing will every been in pure c#. You will need v8. |
Ah, interesting - hadn't even considered the whole "JS inside Less" aspect. What about one of the libraries that implements a fully-managed JavaScript interpreter (like Jint which is what AngleSharp uses)? I've actually been meaning to check out this route for Sass compilation as well. I wonder if one of them would be able to consume the official JS Less compiler... |
Note that we now have a fully integrated JavaScript runtime built-in thanks to @enkafan (#452). It supports Jint by default and the user can swap out alternative JavaScript engines if they want to. The nice thing is that the engine is use is abstracted from the module perspective - modules just have to say "run this JavaScript". That should make it a bit easier to consume JavaScript libraries during execution without worrying about external dependencies, shelling out, and the like. We're still getting a handle on how best to make use of this new capability and how to correctly interoperate with Node libraries, but it should hopefully open up scenarios like consuming a JS-based Less compiler like this issue. |
dotLess is pretty horrible.
It doesn't execute javascript, and as you can already tell, it can't compile bootstrap without modifications or warnings.
I recommend using JavaScriptServices to expose node to C#, and actually use the less compiler from http://lesscss.org/
This can complicate setups a little bit, in that they will have to have a
node
in their path.The text was updated successfully, but these errors were encountered: