Coder Social home page Coder Social logo

lupino3 / jsinterop-base Goto Github PK

View Code? Open in Web Editor NEW

This project forked from google/jsinterop-base

0.0 0.0 0.0 130 KB

Utilities for GWT and J2CL to interact with JavaScript beyond JsInterop

License: Apache License 2.0

Java 83.74% JavaScript 6.57% Shell 4.60% Starlark 5.08%

jsinterop-base's Introduction

JsInterop Base · Build Status

jsInterop-base contains a set of utilities that cannot be expressed with Jsinterop itself and allows GWT and J2CL projects to write certain JavaScript expressions with pure Java.

Bazel dependency

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

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
_JSINTEROP_BASE_VERSION = "1.0.0"
http_archive(
    name = "com_google_jsinterop_base",
    strip_prefix = "jsinterop-base-%s" % _JSINTEROP_BASE_VERSION,
    url = "https://github.com/google/jsinterop-base/archive/%s.zip" % _JSINTEROP_BASE_VERSION,
)

Then add @com_google_jsinterop_base//:jsinterop-base-j2cl to your j2cl_library deps.

Maven dependency

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

<dependency>
  <groupId>com.google.jsinterop</groupId>
  <artifactId>base</artifactId>
  <version>1.0.0</version>
</dependency>

Download the jar file

You can also download manually the jar file.

GWT

If you use jsinterop-base with GWT, you need to inherit the following gwt module in your gwt.xml file:

<inherits name="jsinterop.base.Base" />

Build GWT compatible maven jar files

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

  • Install Bazel.

  • clone this repository with git: git clone https://github.com/google/jsinterop-base.git

  • Inside the repository, run the script maven/release_jsinterop_base.sh:

     $ ./maven/release_jsinterop_base.sh --version local --no-deploy
    

The script will output the directory containing the generated jar files that can be used with maven.

Contributing

Please refer to the contributing document.

Licensing

Please refer to the license file.

Disclaimer

This is not an official Google product.

jsinterop-base's People

Contributors

12wrigja avatar cpovirk avatar dankurka avatar gkdn avatar jdramaix avatar realityforge avatar rluble avatar shicks 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.