用于更少 CSS 的 Java 编译器?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9739724/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Java Compiler for Less CSS?
提问by Windwalker
I am looking for Java-based Less CSS compilers. On Github, I have stumbled across
我正在寻找基于 Java 的 Less CSS 编译器。在 Github 上,我偶然发现
- lesscss4j
- lesscss-java
- 少CSS4J
- lesscss-java
Both are from the same developer. Unfortunately I cannot quite figure out the difference between them.
两者都来自同一开发商。不幸的是,我无法弄清楚它们之间的区别。
Can somebody tell me? Which other compilers do you know?
有人可以告诉我吗?您还知道哪些其他编译器?
采纳答案by codelark
LESS Enginewraps the javascript compiler in a straight-forward Java interface.
LESS 引擎将 javascript 编译器包装在一个简单的 Java 接口中。
I haven't used lesscss-java, so I can't comment on relative quality, but in the small tasks I've needed, I've had no complaints with Less Engine.
我没有使用过lesscss-java,所以我无法评论相对质量,但是在我需要的小任务中,我对Less Engine没有任何抱怨。
回答by candrews
The Official LESS CSS Compiler for Javais pretty nice, too. It's in Maven Central, is thread safe (so performance is pretty good), and it's got an easy to use interface.
Java 的官方 LESS CSS 编译器也很不错。它位于 Maven Central 中,是线程安全的(因此性能非常好),并且具有易于使用的界面。
回答by chpopov
lesscss4jis a Java compiler, written with ANTLR. While this will be faster, the problem is that you need to synchronise it with the official lesscss compiler which is in javascript. This project hasn't been touched for 2 years. Lesscss-javais a wrapper around the official compiler and is running in Rhino JS engine. It used by the popular Lesscss-maven-plugin.
lesscss4j是一个 Java 编译器,用 ANTLR 编写。虽然这会更快,但问题是您需要将它与 javascript 中的官方 lesscss 编译器同步。这个项目已经有 2 年没有动过了。Lesscss-java是官方编译器的包装器,运行在 Rhino JS 引擎中。它被流行的Lesscss-maven-plugin 使用。
回答by Horcrux7
回答by agabrys
LessCSS Compiler- compatible with version 1.7.5. The library is based on the official LessJavaScript compiler adapted to the Rhinoengine.
LessCSS 编译器- 与1.7.5版兼容。该库基于适用于Rhino引擎的官方LessJavaScript 编译器。
It supports sources located at:
它支持位于以下位置的源:
- local drives
- protocols:
- HTTP and HTTPS
- FTP (requires Apache Commons Netlibrary in the class path)
& class path (prefix
classpath://
) - custom - defined by programmers (see FileSystem)
- 本地驱动器
- 协议:
- HTTP 和 HTTPS
- FTP(需要类路径中的Apache Commons Net库)& 类路径(前缀
classpath://
) - 自定义 - 由程序员定义(参见FileSystem)
The library requires Java 8.
该库需要 Java 8。
回答by childno?.de
If you are working with atlassianplugins and in addition to the already mentioned lesscss-maven-pluginyou might also have a look at a (non-open-sourced) derivate from atlassian repository https://maven.atlassian.com/content/repositories/atlassian-public
如果您正在使用atlassian插件,并且除了已经提到的lesscss-maven-plugin 之外,您还可以查看来自 atlassian 存储库https://maven.atlassian.com/content/的(非开源)派生存储库/ Atlassian-public
<plugin>
<groupId>com.atlassian.lesscss</groupId>
<artifactId>lesscss-maven-plugin</artifactId>
</plugin>