适用于 Linux 的 Less 编译器
有没有像less.app这样的东西可以将LESS编译成CSS?我不关心 GUI,也不想通过 NPM(node.js 包管理器)安装它。
Is there a something like less.app that can compile LESS into CSS? I don't care about a GUI and don't want to install it via NPM (node.js package manager.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
您还可以使用这个:http://wearekiss.com/simplless,它具有漂亮的 GUI 和自动观看过程编辑时更新文件。
You can also use this : http://wearekiss.com/simpless with a beautiful GUI and the watching process to automatically update the file when editing.
在 fedora 或 centos 发行版中你应该
in fedora or centos distribution you should
我创建了一个wxPython GUI应用程序,它使用node.js less编译器。现在还处于非常早期的阶段。邀请每个人做出贡献。我计划让它与 MacOS 的 LessCSS 应用程序非常相似。
https://github.com/luislobo/Lobo-LessCSS-Compiler
I have created a wxPython GUI app that uses node.js less compiler. It is on very early stage right now. Everyone's invited to contribute. I'm planning to make it very similar to MacOS's LessCSS App.
https://github.com/luislobo/Lobo-LessCSS-Compiler
一种解决方案是此处讨论的 bash 脚本:https://www.maltheborch。 com/2011/09/less-app-on-linux
并可在此处作为要点: https://gist.github.com/malthe/1234308
需要node、lessc和inotify-tools(一个用于监视文件更改的小库)。只需将其放入文件中,使该文件可执行,然后使用目录作为参数运行它。
缺点是,虽然它会递归地监视目录,但它只会编译修改过的文件 - 它无法自动编译导入您正在处理的文件的 less 文件。
更新:类似的选项是这个稍微复杂的 bash 脚本,它添加了一些功能: http://code.krml.fr/less.app
One solution is a bash script discussed here: https://www.maltheborch.com/2011/09/less-app-on-linux
And available as a gist here: https://gist.github.com/malthe/1234308
It requires node, lessc, and inotify-tools (a small library for watching changes to files.) Simply throw it in a file, make that file executable, then run it with a directory as the argument.
The downside is that while it will watch a directory recursively, it will only compile whichever file was modified--it doesn't have the ability to automatically compile the less files which import the one you're working on.
Update: A similar option is this slightly more complex bash script which adds a few features: http://code.krml.fr/less.app
我知道,这个答案相当“太晚了”,但我最近尝试为 Linux 构建一个简单的 GUI。使用 JAVA 和 less.js,它不仅仅是 Linux,而且是跨平台的。
Simpless 不再受支持(从他们的博客中写的 1.3 开始),Crunch 使用 Adobe Air,这也已经过时了。
这是我的项目: http://project.splashfish.de/Le-css/
I know, that this answer is quite "too late", but I recently tried to build a simple gui for linux. With JAVA and the less.js it is not just linux, but cross-platform.
Simpless isn't supported anymore (since 1.3 as written in their blog) and Crunch uses Adobe Air which is also out of date.
here is my project: http://project.splashfish.de/Le-css/
对于 java,有一个名为 wro4j 的开源工具。
它使用 rhino 作为底层引擎来将 less 编译为 css,但如果您的环境支持,也可以使用 node.js。
For java there is an open source tool called wro4j.
It uses rhino as underlying engine for compiling less to css, but can also use node.js if it is supported on your environment.
虽然建议使用
node.js
版本,您可以将 less 安装为 ruby gem:并使用
/var/lib/gems/1.8/bin/lessc
中的lessc
,因此您可能需要创建符号链接:或将 ruby gems 目录添加到
PATH
变量:编辑:
使用
lessc
如此处所述:Although using
node.js
version is recommended, you can install less as ruby gem:and than use
lessc
which is in/var/lib/gems/1.8/bin/lessc
, so you may want to create symlink:or add ruby gems dir to
PATH
variable:EDIT:
Using
lessc
as described here: