问题描述
我正在尝试最新最好的LESS版本,似乎它在rhino命令行版本中不起作用。我已经完成了以下工作
I'm trying "latest and greatest" LESS version and it seems it does not work in rhino command-line version. I've done following
- 从这里拿到最新的犀牛
- 从最新的less-rhino-1.6.3.js中取出这里
-
从命令行运行以下内容
- Took latest rhino from here https://github.com/downloads/mozilla/rhino/rhino1_7R4.zip
- Took latest less-rhino-1.6.3.js from here https://github.com/less/less.js/tree/master/dist
Running following from command line
java -jar js.jar less-rhino- 1.6.3.js text.less text.css
或
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
输出
写入text.css
我对最新的less-rhino.js缺少什么?我在或。后来的jut说stackoverflow.com是一个获得关于Less的答案的好地方。
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."
推荐答案
我刚刚发现了如何以一种很好的方式做到这一点。 Rhino有一个 -f
标志,这样做很简单。
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
以上代码段应该为您完成工作。 Less的1.6.2版本将cli-stuff从Less分成 lessc-rhino- [v] .js
,将实际的库分成 less- rhino- [v]的.js
。不幸的是,这似乎是一个无证件的变化。
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.
这篇关于如何从命令行正确执行lessc-rhino-1.6.3.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!