JLESS can be used either as a command line tool during your build process, or it can be used at runtime to translate LESS content on demand.
git clone git://github.com/jryans/jless.git cd jless mvn package
# Use -c if you'd like to minify the output java -jar target/jless-<version>-jar-with-dependencies.jar [-c] <input less file>
LessProcessor processor = new LessProcessor(); processor.setCompressionEnabled(true); // Minification is off by default String css = processor.process(<input stream>).toString();
At this time, not all of the features of the LESS language have been ported over:
- Mixin Arguments
- Math Operations
Please file issues for any problems you encounter.
- Alexis Sellier: For the initial implementation of the LESS framework
- Mathias: For the parboiled PEG library, which greatly simplified this port