Giter Site home page Giter Site logo

rasata / jsweet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cincheo/jsweet

0.0 2.0 0.0 583 KB

A Java to JavaScript transpiler.

Home Page: http://www.jsweet.org

License: Apache License 2.0

Java 97.12% JavaScript 1.47% HTML 0.37% TypeScript 1.04%

jsweet's Introduction

JSweet: a Java to JavaScript transpiler

JSweet is built on the top of TypeScript to bring the most up-to-date JavaScript APIs right to the Java world.

JSweet is not Java, it is Java syntax only and the APIs and programs run in JavaScript. With JSweet, your take advantage of all the Java tooling to program real JavaScript applications using the latest JavaScript libraries. JSweet is designed to be as safe as possible and generate fully type-checked JavaScript programs.

Features

  • Full syntax mapping between Java and TypeScript, including classes, interfaces, functional types, union types, tuple types, object types, string types, and so on.
  • Over 1000 JavaScript libraries, frameworks and plugins to write Web and Mobile HTML5 applications (JQuery, Underscore, Angular, Backbone, Cordova, Node.js, and much more).
  • A Maven repository containing all the available libraries in Maven artifacts (a.k.a. candies).
  • An Eclipse plugin for easy installation and use.
  • A simple Maven integration to use JSweet from any other IDE or from the command line.
  • A debug mode to enable Java code debugging within your favorite browser.
  • A set of nice WEB/Mobile HTML5 examples to get started and get used to JSweet and the most common JavaScript APIs (see the Examples section).
  • Support for JavaScript modules (commonjs, amd, umd). JSweet programs can run in a browser or in Node.js.
  • Support for various EcmaScript target versions (ES3 to ES6).
  • Support for bundles to run the generated programs in the most simple way.
  • ...

Getting started

  • Step 1: Install (or check that you have installed) Git, Node.js and Maven (commands git, node, npm and mvn should be in your path).
  • Step 2: Clone the jsweet-quickstart project from Github:
> git clone https://github.com/cincheo/jsweet-quickstart.git
  • Step 3: Run the transpiler to generate the JavaScript code:
> cd jsweet-quickstart
> mvn generate-sources
  • Step 4: Check out the result in your browser:
> firefox webapp/index.html
  • Step 5: Edit the project and start programming:
    • Checkout the examples to see various use cases
    • Refer to the language specifications to know more about programming with JSweet
    • Eclipse users: install the Eclipse plugin to get inline error reporting, build-on-save, and easy configuration UI

More info at http://www.jsweet.org.

Examples

  • Examples illustrating the use of various frameworks in Java (jQuery, Underscore, Backbone, AngularJS, Knockout). Go to project.
  • Examples illustrating the use of the Threejs framework in Java. Go to project.
  • Node.js + Socket.IO + AngularJS. Go to project.

License

JSweet is under the Apache 2.0 Open Source license.

jsweet's People

Contributors

renaudpawlak avatar lgrignon avatar

Watchers

Zo-Hasina Rasatavohary 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.