{"id":21444967,"url":"https://github.com/google/jsinterop-generator","last_synced_at":"2025-07-14T18:32:02.536Z","repository":{"id":44454118,"uuid":"91136737","full_name":"google/jsinterop-generator","owner":"google","description":"Generates Java annotated with JsInterop from JavaScript extern sources","archived":false,"fork":false,"pushed_at":"2024-11-19T20:51:28.000Z","size":754,"stargazers_count":78,"open_issues_count":19,"forks_count":24,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-11-19T21:33:29.890Z","etag":null,"topics":["closure","extern","gwt","j2cl","java","jsinterop"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-12T23:30:16.000Z","updated_at":"2024-11-19T20:51:31.000Z","dependencies_parsed_at":"2024-04-22T21:59:02.999Z","dependency_job_id":"2b1ff550-26ac-4224-8cd9-14aa8ee8eb08","html_url":"https://github.com/google/jsinterop-generator","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fjsinterop-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fjsinterop-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fjsinterop-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fjsinterop-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/jsinterop-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225991873,"owners_count":17556380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["closure","extern","gwt","j2cl","java","jsinterop"],"created_at":"2024-11-23T02:22:09.342Z","updated_at":"2024-11-23T02:22:24.704Z","avatar_url":"https://github.com/google.png","language":"Java","readme":"# JsInterop Generator \u0026middot; [![Build Status](https://github.com/google/jsinterop-generator/actions/workflows/ci.yaml/badge.svg)](https://github.com/google/jsinterop-generator/actions/workflows/ci.yaml)\n\nThe jsinterop generator is a java program that takes closure extern files as input and generates\nJava classes annotated with [JsInterop annotations](https://goo.gl/agme3T).\n\n\u003e *This project is used for building Elemental2.\nAny other uses are experimental. You can use it to generate java APIs for other javascript libraries but we don't provide any official support. Feel free to open issues on the github issue tracker, though.*\n\nRun with Bazel\n---------------\nIf your project uses [Bazel](https://bazel.build). You can use `jsinterop_generator` rule to generate java code.\n\nYou need to add this repository as an external dependency in your `WORKSPACE` file\n\n    new_http_archive(\n      name = \"com_google_jsinterop_generator\",\n      url=\"https://github.com/google/jsinterop-generator/archive/master.zip\",\n      strip_prefix=\"jsinterop-generator-master\",\n    )\n\nand then define a `jsinterop_generator` target in your 'BUILD' file\n\n    load(\"@com_google_jsinterop_generator//:jsinterop_generator.bzl\", \"jsinterop_generator\")\n\n    jsinterop_generator(\n        name = \"my_thirdparty_lib\",\n        srcs = [\"my_externs.js\"],\n    )\n\nYou can now directly depend on `:my_thirdparty_lib` target in your `java_library` rules or build the jar files with `bazel build //path/to/your/BUILD/file/directory:my_thirdparty_lib`.\nThe jar files with the generated source will created in `bazel-bin/path/to/your/BUILD/file/directory`.\n\nRun as a standalone java program\n---------------------------------\n\n### Build the generator from source\n\n- Install [Bazelisk](https://github.com/bazelbuild/bazelisk):\n\n```shell\n    $ npm install -g @bazel/bazelisk\n    $ alias bazel=bazelisk\n```\n- Clone this git repository:\n  ```shell\n  $ git clone https://github.com/google/jsinterop-generator.git\n  ```\n- Build the binary:\n  ```shell\n      $ cd jsinterop-generator\n      $ bazel build //java/jsinterop/generator/closure:ClosureJsinteropGenerator_deploy.jar\n  ```\n\nThe generated jar file can be found at `bazel-bin/java/jsinterop/generator/closure/ClosureJsinteropGenerator_deploy.jar`\n\n### Or download the generator\nTODO(dramaix): provides link to download the generator.\n\n### Run the generator\nNow you have the jar file, just invoke\n\n    java -jar /path/to/ClosureJsinteropGenerator_deploy.jar [options] externs_file...\n\nList of required `options` :\n\nOption | Meaning\n------ | -------\n--output _file_ | Path to the jar file that will contain the generated java classes\n--output_dependency_file _file_ | Path to the dependency file generated by the generator.\n--package_prefix _string_ | Prefix used when we build the java package\n--extension_type_prefix _string_ | Value used for prefixing extension types. It's a good practice to pass the name of the library in upper camel case.\n\n\nContributing\n------------\nPlease refer to [the contributing document](CONTRIBUTING.md).\n\nLicensing\n---------\nPlease refer to [the license file](LICENSE).\n\nDisclaimer\n----------\nThis is not an official Google product.\n\n","funding_links":[],"categories":["JsInterop Generator"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fjsinterop-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fjsinterop-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fjsinterop-generator/lists"}