GithubHelp home page GithubHelp logo

axls / elemental2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from google/elemental2

0.0 2.0 0.0 64 KB

Type checked access to browser APIs for Java code.

License: Apache License 2.0

Python 48.08% JavaScript 34.02% Java 17.91%

elemental2's Introduction

Elemental2

Elemental2 provides type checked access to all browser APIs for Java code. This is done by using closure extern files and generating JsTypes, which are part of the new JsInterop specification that is both implemented in GWT and J2CL.

Build with bazel

If you want to modify and/or build the last version on your own, follow the instructions below:

  • Install Bazel.

  • clone this repository with git: git clone https://github.com/google/elemental2.git

  • Inside the repository, have bazel build all the jar files:

    $ bazel build //java/elemental2/...
    

The jars are available in your bazel-bin/java directory.

Bazel dependencies

If your project use Bazel, add this repository as an external dependency in your WORKSPACE file

  new_http_archive(
    name = "com_google_elemental2",
    url="https://github.com/google/elemental2/archive/master.zip",
  )

Elemental2 is split up in several jars files. Refer to the following targets in your java_library deps:

module Bazel targets
core @com_google_elemental2//java/elemental2/core
dom @com_google_elemental2//java/elemental2/dom
promise @com_google_elemental2//java/elemental2/promise
indexeddb @com_google_elemental2//java/elemental2/indexeddb
svg @com_google_elemental2//java/elemental2/svg
webgl @com_google_elemental2//java/elemental2/webgl
media @com_google_elemental2//java/elemental2/media
webstorage @com_google_elemental2//java/elemental2/webstorage

Maven dependencies

If your project use Maven, add maven dependencies in your pom.xml:

<dependency>
  <groupId>com.google.elemental2</groupId>
  <artifactId>${artifact-id}</artifactId>
  <version>1.0.0-beta-1</version>
</dependency>
module artifact-id
core elemental2-core
dom elemental2-dom
promise elemental2-promise
indexeddb elemental2-indexeddb
svg elemental2-svg
webgl elemental2-webgl
media elemental2-media
webstorage elemental2-webstorage

Download the jar files

You can also download manually the jars files.

module jar file
core elemental2-core.jar
dom elemental2-dom.jar
promise elemental2-promise.jar
indexeddb elemental2-indexeddb.jar
svg elemental2-svg.jar
webgl elemental2-webgl.jar
media elemental2-media.jar
webstorage elemental2-webstorage.jar

GWT

If you use Elemental2 with GWT, you need to inherit the right gwt module in your gwt.xml file:

module GWT module name
core elemental2.core.Core
dom elemental2.dom.Dom
promise elemental2.promise.Promise
indexeddb elemental2.indexeddb.IndexedDb
svg elemental2.svg.Svg
webgl elemental2.webgl.WebGl
media elemental2.media.Media
webstorage elemental2.webstorage.WebStorage

Contributing

Please refer to the contributing document.

Licensing

Please refer to the license file.

Disclaimer

This is not an official Google product.

elemental2's People

Contributors

jdramaix avatar paulcapron 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.