How to correctly execute lessc-rhino-1.6.3.js from command line
Asked Answered
O

1

6

I'm trying "latest and greatest" LESS version and it seems it does not work in rhino command-line version. I've done following

  1. Took latest rhino from here https://github.com/downloads/mozilla/rhino/rhino1_7R4.zip

  2. Took latest less-rhino-1.6.3.js from here https://github.com/less/less.js/tree/master/dist

  3. Running following from command line

    java -jar js.jar less-rhino-1.6.3.js text.less text.css
    or
    java -jar js.jar less-rhino-1.6.3.js lessc-rhino-1.6.3.js text.less text.css

The result is - "silently nothing". When trying to run 'previous latest version' - it runs OK without problems

java -jar js.jar less-rhino-1.5.1.js text.less text.css

Output is

Written to text.css

What I'm missing about latest less-rhino.js? I could not find any relevant help in http://lesscss.org or https://github.com/less/less.js. The later jut says "stackoverflow.com is a great place to get answers about Less."

Osmunda answered 22/2, 2014 at 23:0 Comment(2)
Quick question I need less-rhino too but I can't find the file anywhere. Could you please provide me with a link. The file doesn't seem to exist in the git repo at all anymore.Kershaw
It appears that 1.7.5 is the last release with that file (Sep 3, 2014) github.com/less/less.js/tree/v1.7.5/distOsmunda
M
5

I just found out how to do it in a nice way. Rhino has a -f flag which makes it simple to do .

java -jar js.jar -f less-rhino-1.6.3.js lessc-rhino-1.6.3.js text.less text.css

The above snippet should do the work for you. The 1.6.2 release of Less split the cli-stuff from Less into lessc-rhino-[v].js and the actual library into less-rhino-[v].js. It seems like this is an undocumented change unfortunately.

Montalvo answered 3/3, 2014 at 14:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.