-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add support for using different LESS versions #1
Conversation
Thanks for your contribution. I also wanted to update the plugin to support less 1.4. However, the published less-rhino-1.4.0.js is broken. |
Ah, I did not test 1.4.0 extensively, just compiling a few small LESS files and basic unit test passes (see 'run less with specific compiler version'). The change can be modified to exclude 1.4.0 in the LESS_VERSIONS of LessTask.groovy |
I will look in two weeks into it after my vacation. |
Add support for using different LESS versions
@obecker @avade I have been using the less-rhino-1.3.0.js in my little jcruncher executable jar and Snow framework, and it worked well. I was planning to update to less-rhino-1.4.0.js and I looked in the (https://github.com/less/less.js/tree/master/dist/) but something does not make sense because it seems to be much older than the less-1.4.0.js, and then, I found these threads. Apparently, you have been doing some good work on the subject, so, can you guide me in how I can make less 1.4.x work with rhino? |
@jeremychone no, unfortunately, less-rhino > 1.3.3 doesn't work yet. I currently try to understand the internals of the less compiler, and apparently the rhino version has a problem with |
@obecker I found this: https://github.com/asual/lesscss-engine and it seems to work with the latest less 1.4.2. I copied some of the code and it seems to work. It's quite complex to understand why pure less.js can't run on Rhino (even after Window and other browser objects get mocked), but apparently this developer figured it out. But I made my jcruncher executable jar handlebars/less compiler work with that. I am currently testing it, and will release it soon. Anyway, the asual code seems to be very well thought. |
This adds support for multiple versions LESS. All of the rhino files available on https://github.com/less/less.js/tree/master/dist/ have been included. You can now specify the LESS version to use in the configuration.