Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Converts your Groovy code to Javascript
Groovy JavaScript Java

README.adoc

Build Status Build Status Build Status (AppVeyor) Coverage Status

grooscript

Chat

Converts your Groovy or Java code to JavaScript(Groovy 2.x to Javascript ECMAScript 5). You need groovy jar greater than 2.0 to make conversions. For more information about the project, see grooscript.org

Not a full groovy to javascript conversion. Some groovy and java features not supported, check documentation for more info. Converted code, needs grooscript.js to run. grooscript.js inside the jar in META-INF/resources for servlet 3.0 support. Also a Node.js npm module imports it.

Try online conversions here. Can convert .java and .groovy files or a text fragment as:

@Grab('org.grooscript:grooscript:1.1.2')

import org.grooscript.GrooScript

def result = GrooScript.convert '''
    def sayHello = { println "Hello ${it}!" }
    ['Groovy','JavaScript','GrooScript'].each sayHello'''

println result

Latest Versions

The latest release version is 1.1.2, released on 2015-05-24. The current development version is 1.1.3-SNAPSHOT.

Releases are available from Maven Central and Bintray.

Build

Using gradle wrapper, version 2.4. Only Groovy dependencies in the project. You need JDK 1.7+ to build and test the project.

First time, you have to install Node.js stuff, maybe you have to run as administrator, do it with:

./gradlew npmInstall

Create IntelliJ IDEA project:

./gradlew idea

Test project:

./gradlew test

Build project:

./gradlew build

Tools

Grails 2 plugin

Grails 3 plugin

Gradle plugin

Npmjs package

License

Grooscript licensed under the terms of the Apache License, Version 2.0

Contributors

  • Jorge Franco

  • Serge Tarkovski

  • Abel Salgado

  • Alberto Navarrete

  • Jonatas Emidio

  • yellowsnow

Contact

Twitter: @grooscript

Please all feedback welcome, thanks!

Something went wrong with that request. Please try again.