A Java 8 library and/or executable jar for compiling lesscss and handlebars
JavaScript CSS Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
README.md
jcruncher.cfg
pom.xml

README.md

Intro

Simple Java 8 library as well as command line (i.e. executable jar) to compile lesscss and handlebars using Java 8 Nashorn JS VM.

As Library

jcruncher as an library (i.e. API) coming to maven central soon, but feel free to use the LessProcessor and HbsProcessor classes to compile lesscss or handlebars respectively. Make sure to reuse the Processor as they create their own Nashorn script environments.

As Executable Jar (i.e. jcruncherEx)

jcruncherEx download & documentation

Building the executable jar

To build this library as a exectable jar (i.e. jcruncherEx.jar), use the following maven command:

mvn clean compile assembly:single

Lesscss and Handlebar support

Currently supported in jcruncher 0.9.4:

  • lesscss 1.7.5 Unfortunately lesscss 2.x major refactoring seems to make nashorn support harder, or at least different from previous 1.x versions. Consequently, quite a bit of work is needed, and not clear when we can get to it.
  • handlebars 3.0.1 Make sure to use handlebars 3.0.1 runtime

License

Licensed under the Apache License, Version 2.0 (the "License"): http://www.apache.org/licenses/LICENSE-2.0

Note: Lesscss resource loading and exception handling java code was mostly copied from https://github.com/asual/lesscss-engine

Warning

As of now, the LessProcess or HbsProcessor should be threadsafe, but more verification needs to be made.