Haml, less-css, coffee-script and require-js compiler for Java
JavaScript Java Perl Other
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Concoct : CoffeeScript, Less-css, Haml and RequireJS compiler for the Java world

Concoct your web-app with HAML, CoffeeScript, Less-Css and RequireJS in your Java world.


The whole idea is to provide a simple way to use JavaScript compiler (less, haml, coffee-script, requireJs) for Java projects (based on Rhino).

Each compiler is independant and is easy to use.

For exemple, if you want to compile a require-js file, all you need to do is :

  • import the concoct jar from maven

  • call this simple lines of code :

    import org.filirom1.concoct.requireJs.*;

    String compiledJs = new RequireJsCompiler().compile(new File("/home/romain/require-js-project/app.js"));

For less, haml, and coffescript it is very simple too. Look at the tests in the sources to see real-life exemple.

Actually there is no maven-plugin, ant-plugin, gradle-plugin, grails-plugin, buildr-plugin, sbt-plugin,... using this library. Because there is a lot of build tools, this is up to you to create your own, but there will be no problem for you I think, because I tried to keep this library as simple as possible.

Shortly I will do the grails, and the maven plugin because I need it, keep tuned.

Update : If you are looking for a runtime solution or a maven very configurable build-time solution look at wro4j

How to import using Maven

The library is not yet on maven central. I am waiting for some feedback before releasing a 1.0 version under maven-central.

So, if you are a maven user edit your pom.xml :



All the compilers

You have the choice to import :


A groovy grape exemple

If you have grovvy installed on your machine, you can test the compiler very easily with a groovy script :

@GrabResolver(name = 'filirom1', root = 'https://Filirom1@github.com/Filirom1/filirom1-mvn-repo/raw/master/releases')
@Grab(group = 'org.filirom1', module = 'concoct-require-js', version = '0.1')

import org.filirom1.concoct.requireJs.*;

println new RequireJsCompiler().compile(new File("/home/romain/require-js-project/app.js"));

How to contribute

You want to create a markdown compiler in Java using the Javascript version,... or you anything else, just fork this project, code, make a test and ask for a pull-request.

I will be happy to add your contribution. Open Source rocks !!!!!


The code is under Apache2 licence :


Thanks to