Skip to content
This repository was archived by the owner on Jun 23, 2026. It is now read-only.

update less.js to 2.4.0 - #79

Open
ftiasch wants to merge 1 commit into
cowboyd:masterfrom
ftiasch:master
Open

update less.js to 2.4.0#79
ftiasch wants to merge 1 commit into
cowboyd:masterfrom
ftiasch:master

Conversation

@ftiasch

@ftiasch ftiasch commented Mar 16, 2015

Copy link
Copy Markdown

close #77

@cowboyd

cowboyd commented Mar 17, 2015

Copy link
Copy Markdown
Owner

It looks like all the testcases are failing. Wer you able to get them running on your machine?

@ftiasch

ftiasch commented Mar 17, 2015

Copy link
Copy Markdown
Author

@cowboyd Yes. commonjs.rb should also be updated to get this work.

I also posed a pull request on the commonjs.rb repo.

@cowboyd

cowboyd commented Mar 17, 2015

Copy link
Copy Markdown
Owner

That PR, cowboyd/commonjs.rb#17 also fails, and is not safe to merge

@ftiasch

ftiasch commented Mar 18, 2015

Copy link
Copy Markdown
Author

well, let me have an eye on both commits ...

2015-03-18 3:11 GMT+08:00 Charles Lowell notifications@github.com:

That PR, cowboyd/commonjs.rb#17
cowboyd/commonjs.rb#17 also fails, and is not
safe to merge


Reply to this email directly or view it on GitHub
#79 (comment).

@maxd

maxd commented Apr 3, 2015

Copy link
Copy Markdown

@ftiasch Have you any ideas how to fix CI problems in this and related PR?

@ftiasch

ftiasch commented Apr 3, 2015

Copy link
Copy Markdown
Author

Sorry, I haven't. I got so busy these days to have no time the keep track
on it. :(

2015-04-03 16:20 GMT+08:00 Maxim Dobryakov notifications@github.com:

@ftiasch https://github.com/ftiasch Have you any ideas how to fix CI
problems in this and related PR?


Reply to this email directly or view it on GitHub
#79 (comment).

@simi

simi commented Apr 27, 2015

Copy link
Copy Markdown

I've spend few hours on this today. I'll try to continue soon. I'm just not sure if we need to keep usage of less.Parser or we can move directly to simpler less.render.

@ftiasch

ftiasch commented Apr 28, 2015

Copy link
Copy Markdown
Author

The lessjs document says in new version (>= 2.0) we should use less.render
instead.

2015-04-28 5:18 GMT+08:00 Josef Šimánek notifications@github.com:

I've spend few hours on this today. I'll try to continue soon. I'm just
not sure if we need to keep usage of less.Parser or we can move directly
to simpler less.render.


Reply to this email directly or view it on GitHub
#79 (comment).

@simi

simi commented Apr 28, 2015

Copy link
Copy Markdown

Sure, but less.Parser is still around.

@ftiasch

ftiasch commented Apr 28, 2015

Copy link
Copy Markdown
Author

Yes. But I think we'd better be consistent with what lessc is doing.

2015-04-28 19:18 GMT+08:00 Josef Šimánek notifications@github.com:

Sure, but less.Parser is still around.


Reply to this email directly or view it on GitHub
#79 (comment).

@rstacruz

Copy link
Copy Markdown
Contributor

sadly it looks like commonjs.rb doesn't support 2 things:

  • index.js (require('./less-node') resolving to less-node/index.js)
  • relative paths (require(./environment))

the first one is easy to fix but the second is a bit more challenging.

@ftiasch

ftiasch commented May 21, 2015

Copy link
Copy Markdown
Author

@rstacruz I have made a pull request cowboyd/commonjs.rb#18 to fix these two (Thanks to @simi for adding tests).

However, the pr seems not yet be merged.

@rstacruz

Copy link
Copy Markdown
Contributor

hmm, tests are failing on this one even with that PR being applied to common.js.

@rstacruz

Copy link
Copy Markdown
Contributor
6) Less::Parser when configured with multiple load paths will load files from both paths
     Failure/Error: subject.parse('@import "one.less";').to_css.gsub(/\n/,'').strip.should eql ".one {  width: 1;}"
     NoMethodError:
       undefined method `less' for Less:Module
     # ./lib/less/parser.rb:62:in `parse'
  58) Less::Parser less-test selectors.less
     Failure/Error: Less.tree.functions[:add] = lambda do |*args| # function (a, b)
     NoMethodError:
       undefined method `functions' for #<V8::Object:0x007ff77a924748>
     # ./spec/less/parser_spec.rb:114:in `block (3 levels) in <top (required)>'

@cowboyd

cowboyd commented May 21, 2015

Copy link
Copy Markdown
Owner

Note: commonjs cowboyd/commonjs.rb#18 causes that library's test suite to fail which is why it has not yet been merged.

@cowboyd

cowboyd commented May 21, 2015

Copy link
Copy Markdown
Owner

Actually nevermind, looks like the specs are passing on that one, there is still a little bit of work to do there wrt test coverage.

@simi

simi commented May 21, 2015

Copy link
Copy Markdown

I'm still on this. But I'm not sure about my question in #79 (comment).

@cowboyd

cowboyd commented May 21, 2015

Copy link
Copy Markdown
Owner

@simi is there a problem supporting both?

@simi

simi commented May 21, 2015

Copy link
Copy Markdown

I don't see any benefits for that.

@cowboyd

cowboyd commented May 21, 2015

Copy link
Copy Markdown
Owner

Well, if we remove the old API, then it means that any dependent libraries need to be updated. This includes https://github.com/metaskills/less-rails for example.

@ftiasch

ftiasch commented May 21, 2015

Copy link
Copy Markdown
Author

I need to add some words here: I also tried to update less-rails, but the old rails helper (asset-url, asset-path etc) seems not working and I cannot figure out why.

So I didn't send a PR on less-rails.

There may be some more work to be done.

@simi

simi commented May 21, 2015

Copy link
Copy Markdown

@ftiasch can you share your code?

@ftiasch

ftiasch commented May 21, 2015

Copy link
Copy Markdown
Author

@simi It's on ftiasch/less-rails . trivial change

@simi

simi commented May 21, 2015

Copy link
Copy Markdown

@cowboyd I think we can keep public API same for both variants.

@tBaxter tBaxter mentioned this pull request Apr 19, 2016
@stickbyatlas

Copy link
Copy Markdown

Was bitten by the pre-2.x version of LESS in a project the other day, since @import statements can't include variables from sibling files. As a result, I ended up having to kick out to the JS version via bash in my Jekyll project:

desc "Compile LESS master to CSS output file"
task :compile_less do

    puts "\n"
    print "Compiling LESS... "

    sh '/usr/local/bin/lessc assets/css/styles.less _site/assets/css/styles.less.css'

    puts "done!"
    puts "\n"
end # task :compile_less

This feels gross to me. Does anybody have a better way to use Less 2.x? I'm a total Ruby / Jekyll novice and have no idea what I'm doing, but the above worked and let me add the Rake task to my Guardfile.

@brendon

brendon commented Nov 7, 2018

Copy link
Copy Markdown

Is there any enthusiasm for getting this moving again?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update to LESS 2.X

7 participants