DefinitelyTyped Java Libraries
The repository of Java APIs providing access to high quality libraries wrapping any JavaScript library and its TypeScript definition. Contribute to this project by forking and converting more of existing typings in this repository. It is easy. Clone the repository. Select a project, like underscore
and:
$ cp jquery/pom.xml underscore/pom.xml
$ cd underscore
$ open pom.xml
# replace references to jquery with underscore
$ mvn install
A Java wrapper giving you access to the underscore
library will be created for you in your local Maven repository. In addition to that write some tests to verify the generated library works. Then create a pull request.
You may need to do some tweaks (e.g. comment something out or to remove not typeable definition) to the typings definition file to make the conversion to Java successful. Here is a sample commit that integrates knockout Java bindings.
Alternatively you can improve the Maven Typings Plugin to handle the conversion in a better way.
Using Latest Version of the Libraries
The snapshots of the DefinitelyTyped Java Libraries are being uploaded to a Maven repository and are ready for your immediate consumption. The current list of available libraries contains the core JavaScript (net.java.html.lib), generic access to DOM (net.java.html.lib.dom) and popular JavaScript libraries like JQuery, Angular and Knockout. To include these libraries in your application add a repository definition to your pom.xml
file:
<repositories>
<repository>
<id>typings-snapshots</id>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
</repositories>
and then you can depend on any of these libraries in a regular Maven way:
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>net.java.html.lib</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>net.java.html.lib.jquery</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
Contributions
DefinitelyTyped Java Libraries project can only move forward thanks to contributions of users like you! There is so many typings definitions that are waiting for conversion to Java!
License
This project is licensed under the MIT license. Copyrights on the definition files are respective of each contributor listed at the beginning of each definition file. The copyrights of individual Java wrappers can be found in history. This work is sponsored by DukeScript project.