Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bokysan/jlesscss
Less CSS compiler for Java, based on official lesscss.js
https://github.com/bokysan/jlesscss
css-compiler java javascript less less-compiler less-css servlet
Last synced: 14 days ago
JSON representation
Less CSS compiler for Java, based on official lesscss.js
- Host: GitHub
- URL: https://github.com/bokysan/jlesscss
- Owner: bokysan
- License: apache-2.0
- Created: 2014-06-27T09:09:09.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-02T07:23:59.000Z (over 10 years ago)
- Last Synced: 2024-11-18T15:44:50.470Z (3 months ago)
- Topics: css-compiler, java, javascript, less, less-compiler, less-css, servlet
- Language: JavaScript
- Size: 492 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
jlesscss
========Less CSS compiler for Java, based on official lesscss.js
Heavily inspired by:
* http://mojo.codehaus.org/lesscss-maven-plugin/
* https://github.com/ultraq/lesscss-filter
* https://github.com/marceloverdijk/lesscss-javaWhy did I do it? Simply because most Java compilers rely on the outdated version of Less and it's difficult
to keep up with the latest less developments.This method allows you to use the latest version of less by simply dropping the `less-rhino.js` file into the
appropriate directory.What's wrong with the [official LESS compiler](https://github.com/marceloverdijk/lesscss-java)? Well, two things:
* it reads files from disk and does not use HTTP servlet API (hence, your *.less files must be static files and
cannot be dynamically generated)
* always creates temporary files when compiling
* support for different scripting engines through `javax.scripting`: https://github.com/pose/jav8 and nashornUsage of the filter
===================To use the servlet, simply drop the JAR into your webapp. The Servlet 3.0 should pick up the filter and
attach it to *.less automatically.Then you only need to to:
```html
```Using the maven plugin
======================As the compilation can take some time (yes, Rhino is slow), there's also an option to use a precompiled version.
For this, please use the maven plugin found here: https://github.com/marceloverdijk/lesscss-maven-pluginExample usage:
```xml
org.lesscss
lesscss-maven-plugin
${project.basedir}/src/main/webapp/_common/css
${project.build.directory}/${project.build.finalName}/_common/css
true
common.less
compile
```Requirements
============* Java 7
* A Servlet 3.0 compliant servlet container