Skip to content
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

Merged
merged 3 commits into from
Sep 6, 2013

Conversation

avade
Copy link
Contributor

@avade avade commented Aug 2, 2013

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.

@obecker
Copy link
Owner

obecker commented Aug 2, 2013

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.
So, are you sure that your 1.4.0 is working? My former tests with 1.4.0 features (for example the new convert function) failed.
See less/less.js#1405
and less/less.js#1170

@avade
Copy link
Contributor Author

avade commented Aug 2, 2013

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

@obecker
Copy link
Owner

obecker commented Aug 2, 2013

I will look in two weeks into it after my vacation.

obecker added a commit that referenced this pull request Sep 6, 2013
Add support for using different LESS versions
@obecker obecker merged commit 4d50d6c into obecker:master Sep 6, 2013
@jeremychone
Copy link

@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?

@obecker
Copy link
Owner

obecker commented Sep 21, 2013

@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 @import. It seems, if we want a working rhino version, we have to solve this problem ourselves.

@jeremychone
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants