All Projects → chiquitinxx → Grooscript

chiquitinxx / Grooscript

Licence: other
Converts your Groovy code to Javascript

Programming Languages

groovy
2714 projects

:project-name: grooscript :project-full-path: chiquitinxx/grooscript :github-branch: master :release-date: 12-09-2016 :current-version: 1.3.0 :next-version: 1.3.1-SNAPSHOT

image:https://travis-ci.org/{project-full-path}.svg?branch={github-branch}["Build Status", link="https://travis-ci.org/{project-full-path}"] image:https://coveralls.io/repos/chiquitinxx/grooscript/badge.svg?branch={github-branch}["Coverage Status", link="https://coveralls.io/r/chiquitinxx/grooscript?branch={github-branch}"] image:https://maven-badges.herokuapp.com/maven-central/org.grooscript/grooscript/badge.svg["Maven Central Version", link="http://search.maven.org/#search|ga|1|a%3A%22grooscript%22"]

== grooscript

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 http://grooscript.org[grooscript.org]

Not a full groovy to javascript conversion. Some groovy and java features not supported, check link:http://grooscript.org/doc.html[documentation] for more info. Converted code, needs link:https://github.com/{project-full-path}/blob/master/src/main/resources/META-INF/resources/grooscript.js[grooscript.js] to run. grooscript.js inside the jar in META-INF/resources for servlet 3.0 support. Also a Node.js link:http://www.npmjs.org/package/grooscript[npm] module imports it.

Try online conversions link:http://grooscript.org/conversions.html[here]. Can convert .java and .groovy files or a text fragment as:

[source,groovy] [subs="verbatim,attributes"]

@Grab('org.grooscript:grooscript:{current-version}')

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 {current-version}, released on {release-date}. The current development version is {next-version}.

Releases are available from link:https://search.maven.org/#search%7Cga%7C1%7Ca%3A%22grooscript%22[Maven Central] and link:https://bintray.com/chiquitinxx/grooscript/org.grooscript%3Agrooscript/view[Bintray].

== Build

Using gradle wrapper, 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 link:http://grails.org/plugin/grooscript[plugin]

Grails 3 link:http://grooscript.org/grails3-plugin[plugin]

Gradle link:http://plugins.gradle.org/plugin/org.grooscript.conversion[plugin]

Npmjs link:https://www.npmjs.org/package/grooscript[package]

== Demos

Browser and node.js link:https://github.com/chiquitinxx/grooscript-demos[demos]

Spring boot and gradle plugin in this link:https://github.com/chiquitinxx/books-demo[books] demo

Grails 3 websockets link:https://github.com/chiquitinxx/circles[circles] demo

Grails 3.1 with gradle and grails plugins in link:https://github.com/chiquitinxx/grails3-demo-grooscript[action]

== License

Grooscript licensed under the terms of the link:http://www.apache.org/licenses/LICENSE-2.0.html[Apache License, Version 2.0]

== Contributors

  • Jorge Franco
  • Serge Tarkovski
  • Abel Salgado
  • Alberto Navarrete
  • Jonatas Emidio
  • yellowsnow
  • ulrichenslin
  • Lourens van Heerden
  • Ruaan van der Spuy

== Contact

Twitter: link:http://twitter.com/grooscript:[@grooscript]

Email: mailto:[email protected][]

#grooscript channel in link:https://groovycommunity.com/[Apache Groovy Community Slack]

Please all feedback welcome, thank you!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].