GithubHelp home page GithubHelp logo

pkdevboxy / gwt-api-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from manolo/gwt-api-generator

0.0 2.0 0.0 783 KB

Generator for creating GWT JSInterop clients from Polymer Web Components

License: Apache License 2.0

JavaScript 49.37% Java 50.63%

gwt-api-generator's Introduction

Vaadin gwt-api-generator

Vaadin gwt-api-generator is a tool that produces GWT Java APIs for JavaScript libraries provided as input, assuming their APIs are decorated with JSDoc annotations.

Currently the generator only supports Web Components written in Polymer 1.0 syntax. Support for other type of JavaScript sources might be added in the future.

Original motivation behind the project was to provide GWT community an easy access to the elements in Vaadin Elements library.

Installation and Usage

  • Installation
$ npm install -g vaadin/gwt-api-generator

If you've installed node and npm using sudo, installing packages globally will also require you to use sudo. See http://givan.se/do-not-sudo-npm/ how to remedy the situation.

  • Generating java code for bower packages installed in your bower_components folder

    $ bower install my-web-component
    $ gwt-api-generator
  • Generating java code for a complete library

    $ gwt-api-generator --package=PolymerElements/paper-elements
  • Generating resources with a custom groupId and artifactId

    $ gwt-api-generator --package=PolymerElements/paper-elements \
                      --groupId=com.foo --artifactId=bar
  • Generating resources for a non-maven structure

    $ gwt-api-generator --package=PolymerElements/paper-elements
                        --javaDir=src --resourcesDir=src
  • Generating maven pom.xml file and packaging the result as a ready-to-use .jar file

    $ gwt-api-generator --package=PolymerElements/paper-elements --pom
    $ mvn package

Pre-built packages

Paper, Iron and Vaadin-Core elements

Vaadin officially maintains and supports a pre-built package deployed at Maven Central repository containing all the resources needed for using Polymer paper-elements, iron-elements and vaadin-core-elements in a GWT application.

Build script, demo and usage instructions for the project are available here.

You also might see all these components in action using the Show Case application

About GWT 2.7/2.8 compatibility

Vaadin gwt-api-generator produces @JsType interfaces for JS Element level access from Java Objects.

Generated classes are written using Java 1.7 syntax, and rely on GWT JSInterop available as an experimental feature from GWT 2.7.0, and will be stable in GWT 2.8.0.

But, starting with gwt-api-generator 1.2.1, GWT 2.7.0 is not supported anymore since the experimental version of jsInterop in 2.7.0 does not support JsFunctions.

Additionally JsInterop has suffered a complete API change in 2.8.0, so old syntax will be deprecated and remove.

So, will encourage to make your project depend on GWT 2.8.0-SNAPSHOT and use new JsInterop syntax.

gwt-api-generator's People

Contributors

amahdy avatar cwayfinder avatar jouni avatar manolo avatar saulis avatar tehapo avatar tomivirkki avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.