Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module(
name = "io_bazel_rules_closure",
name = "stackb_rules_closure",
version = "0.0.0",
compatibility_level = 1,
)
Expand Down Expand Up @@ -167,7 +167,7 @@ maven.install(
known_contributing_modules = [
"build_stack_rules_proto",
"grpc-java",
"io_bazel_rules_closure",
"stackb_rules_closure",
"protobuf",
"rules_web_testing_java",
],
Expand Down
31 changes: 13 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Notice

This is fork of [bazelbuild/io_bazel_rules_closure](https://github.com/bazelbuild/io_bazel_rules_closure) with the following main differences:
This is fork of [bazelbuild/rules_closure](https://github.com/bazelbuild/rules_closure) with the following main differences:

- repo name is `@io_bazel_rules_closure` instead of `@rules_closure`.
- repo name is `@stackb_rules_closure` instead of `@rules_closure`.
- the `closure/library` has been restored.
- missing shims and third-party closure js code has been vendored in `google3/`.
- support for protobuf-javascript has been restored.
Expand All @@ -11,11 +11,6 @@ This is fork of [bazelbuild/io_bazel_rules_closure](https://github.com/bazelbuil
- bzlmod deps updated
- stricter .bazelrc flags

> Since this fork is closer to the original rules_closure by @jart and needs to
> be distinguished in the BCR, the repo name has been reverted to
> `@io_bazel_rules_closure`. The version numbers and tagging scheme are
> somewhat arbitrary and will try to follow the numbering in the upstream repo.

# Closure Rules for Bazel (αlpha) [![Bazel CI build status](https://badge.buildkite.com/7569410e2a2661076591897283051b6d137f35102167253fed.svg)](https://buildkite.com/bazel/closure-compiler-rules-closure-postsubmit)

JavaScript | Stylesheets | Miscellaneous
Expand Down Expand Up @@ -82,7 +77,7 @@ First you must [install Bazel].
Then you add the following to your MODULE.bazel file:

```bzl
bazel_dep(name = "io_bazel_rules_closure", version = "0.15.0")
bazel_dep(name = "stackb_rules_closure", version = "0.15.0")
```
The root module has to declare the same override for rules_webtesting,
rules_scala, and google_bazel_common temporarily until they are registered
Expand All @@ -95,9 +90,9 @@ for that matter; they will be fetched automatically by Bazel.

Please see the test directories within this project for concrete examples of usage:

- [//closure/testing/test](https://github.com/bazelbuild/io_bazel_rules_closure/tree/master/closure/testing/test)
- [//closure/compiler/test](https://github.com/bazelbuild/io_bazel_rules_closure/tree/master/closure/compiler/test)
- [//closure/stylesheets/test](https://github.com/bazelbuild/io_bazel_rules_closure/tree/master/closure/stylesheets/test)
- [//closure/testing/test](https://github.com/stackb/stackb_rules_closure/tree/master/closure/testing/test)
- [//closure/compiler/test](https://github.com/stackb/stackb_rules_closure/tree/master/closure/compiler/test)
- [//closure/stylesheets/test](https://github.com/stackb/stackb_rules_closure/tree/master/closure/stylesheets/test)


# Reference
Expand Down Expand Up @@ -319,7 +314,7 @@ This rule can be referenced as though it were the following:
- **defs:** (List of strings; optional) Specifies additional flags to be passed
to the Closure Compiler, e.g. `"--hide_warnings_for=some/path/"`. To see what
flags are available, run:
`bazel run @io_bazel_rules_closure//third_party/java/jscomp:main -- --help`
`bazel run @stackb_rules_closure//third_party/java/jscomp:main -- --help`

### Support for AngularJS

Expand Down Expand Up @@ -441,17 +436,17 @@ This rule can be referenced as though it were the following:
`<script>` tag based on a depth-first preordering.

- **html:** (Label; optional; default is
`"@io_bazel_rules_closure//closure/testing:empty.html"`) HTML file containing
`"@stackb_rules_closure//closure/testing:empty.html"`) HTML file containing
DOM structure of virtual web page *before* `<script>` tags are automatically
inserted. Do not include a doctype in this file.

- **harness:** (Label; required; default is
`"@io_bazel_rules_closure//closure/testing:phantomjs_harness"`) JS binary or
`"@stackb_rules_closure//closure/testing:phantomjs_harness"`) JS binary or
library exporting a single source file, to be used as the PhantomJS outer
script.

- **runner:** (Label; optional; default is
`"@io_bazel_rules_closure//closure/testing:phantomjs_jsunit_runner"`) Same as
`"@stackb_rules_closure//closure/testing:phantomjs_jsunit_runner"`) Same as
`deps` but guaranteed to be loaded inside the virtual web page last. This
should run whatever tests got loaded by `deps` and then invoke `callPhantom`
to report the result to the `harness`.
Expand Down Expand Up @@ -632,7 +627,7 @@ This rule can be referenced as though it were the following:
[Closure Tools]: https://developers.google.com/closure/
[Closure coding conventions]: https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/ClosureCodingConvention.java
[ECMASCRIPT6]: http://es6-features.org/
[Exports and Entry Points]: https://github.com/bazelbuild/io_bazel_rules_closure/blob/master/closure/compiler/test/exports_and_entry_points/BUILD
[Exports and Entry Points]: https://github.com/stackb/stackb_rules_closure/blob/master/closure/compiler/test/exports_and_entry_points/BUILD
[Google JavaScript Style Guide]: https://google.github.io/styleguide/jsguide.html
[Google coding conventions]: https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/GoogleCodingConvention.java
[Name]: https://docs.bazel.build/versions/master/build-ref.html#name
Expand All @@ -642,7 +637,7 @@ This rule can be referenced as though it were the following:
[asserts]: https://github.com/google/closure-library/blob/master/closure/goog/testing/asserts.js#L1308
[base.js]: https://github.com/google/closure-library/blob/master/closure/goog/base.js
[install Bazel]: https://docs.bazel.build/versions/master/install.html
[blockers]: https://github.com/bazelbuild/io_bazel_rules_closure/labels/launch%20blocker
[blockers]: https://github.com/stackb/stackb_rules_closure/labels/launch%20blocker
[closure_css_binary]: #closure_css_binary
[closure_css_library]: #closure_css_library
[closure_grpc_web_library]: https://github.com/grpc/grpc-web/blob/9b7b2d5411c486aa646ba2491cfd894d5352775b/bazel/closure_grpc_web_library.bzl#L149
Expand All @@ -654,7 +649,7 @@ This rule can be referenced as though it were the following:
[css-sourcemap]: https://developer.chrome.com/devtools/docs/css-preprocessors
[dependency]: https://docs.bazel.build/versions/master/build-ref.html#dependencies
[filegroup]: https://docs.bazel.build/versions/master/be/general.html#filegroup
[idom-example]: https://github.com/bazelbuild/io_bazel_rules_closure/blob/80d493d5ffc3099372929a8cd4a301da72e1b43f/closure/templates/test/greeter_idom.js
[idom-example]: https://github.com/stackb/stackb_rules_closure/blob/80d493d5ffc3099372929a8cd4a301da72e1b43f/closure/templates/test/greeter_idom.js
[java_library.exports]: https://docs.bazel.build/versions/master/be/java.html#java_library.exports
[java_library]: https://docs.bazel.build/versions/master/be/java.html#java_library
[jquery]: http://jquery.com/
Expand Down
2 changes: 1 addition & 1 deletion closure/compiler/test/goog_es6_interop/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ closure_js_library(
"person_factory.js",
],
# TODO(yannic): Remove this suppression when
# `bazelbuild/io_bazel_rules_closure#436` is fixed.
# `stackb/stackb_rules_closure#436` is fixed.
suppress = ["moduleLoad"],
deps = [
":person",
Expand Down
2 changes: 1 addition & 1 deletion closure/goog/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is a open-sourced version of internal BUILD file for closure base.
# They are too different to attempt a copybara transform between them.
# This file is used in the closure-library repo by external Bazel users (via io_bazel_rules_closure)
# This file is used in the closure-library repo by external Bazel users (via stackb_rules_closure)

load("//closure/compiler:closure_base_js_library.bzl", "closure_base_js_library")

Expand Down
2 changes: 1 addition & 1 deletion closure/protobuf/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def closure_jspb_library(**kwargs):
]

deps = kwargs.pop("deps", [])
deps.append("@io_bazel_rules_closure//closure/protobuf:jspb")
deps.append("@stackb_rules_closure//closure/protobuf:jspb")

closure_js_library(
deps = deps,
Expand Down
46 changes: 23 additions & 23 deletions closure/templates/closure_js_template_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -128,29 +128,29 @@ def closure_js_template_library(
)

deps = deps + [
"@io_bazel_rules_closure//closure/goog/array",
"@io_bazel_rules_closure//closure/goog/asserts",
"@io_bazel_rules_closure//closure/goog/debug",
"@io_bazel_rules_closure//closure/goog/format",
"@io_bazel_rules_closure//closure/goog/html:safehtml",
"@io_bazel_rules_closure//closure/goog/html:safescript",
"@io_bazel_rules_closure//closure/goog/html:safestyle",
"@io_bazel_rules_closure//closure/goog/html:safestylesheet",
"@io_bazel_rules_closure//closure/goog/html:safeurl",
"@io_bazel_rules_closure//closure/goog/html:trustedresourceurl",
"@io_bazel_rules_closure//closure/goog/html:uncheckedconversions",
"@io_bazel_rules_closure//closure/goog/i18n:bidi",
"@io_bazel_rules_closure//closure/goog/i18n:bidiformatter",
"@io_bazel_rules_closure//closure/goog/i18n:numberformat",
"@io_bazel_rules_closure//closure/goog/object",
"@io_bazel_rules_closure//closure/goog/soy",
"@io_bazel_rules_closure//closure/goog/soy:data",
"@io_bazel_rules_closure//closure/goog/soy:renderer",
"@io_bazel_rules_closure//closure/goog/string",
"@io_bazel_rules_closure//closure/goog/string:const",
"@io_bazel_rules_closure//closure/goog/uri",
"@io_bazel_rules_closure//closure/templates:soy_jssrc",
"@io_bazel_rules_closure//google3/javascript/xid",
"@stackb_rules_closure//closure/goog/array",
"@stackb_rules_closure//closure/goog/asserts",
"@stackb_rules_closure//closure/goog/debug",
"@stackb_rules_closure//closure/goog/format",
"@stackb_rules_closure//closure/goog/html:safehtml",
"@stackb_rules_closure//closure/goog/html:safescript",
"@stackb_rules_closure//closure/goog/html:safestyle",
"@stackb_rules_closure//closure/goog/html:safestylesheet",
"@stackb_rules_closure//closure/goog/html:safeurl",
"@stackb_rules_closure//closure/goog/html:trustedresourceurl",
"@stackb_rules_closure//closure/goog/html:uncheckedconversions",
"@stackb_rules_closure//closure/goog/i18n:bidi",
"@stackb_rules_closure//closure/goog/i18n:bidiformatter",
"@stackb_rules_closure//closure/goog/i18n:numberformat",
"@stackb_rules_closure//closure/goog/object",
"@stackb_rules_closure//closure/goog/soy",
"@stackb_rules_closure//closure/goog/soy:data",
"@stackb_rules_closure//closure/goog/soy:renderer",
"@stackb_rules_closure//closure/goog/string",
"@stackb_rules_closure//closure/goog/string:const",
"@stackb_rules_closure//closure/goog/uri",
"@stackb_rules_closure//closure/templates:soy_jssrc",
"@stackb_rules_closure//google3/javascript/xid",
]

closure_js_library(
Expand Down
2 changes: 1 addition & 1 deletion closure/webfiles/web_library_external.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def _web_library_external(ctx):
lines.append("")
lines.append("licenses(%s)" % repr(ctx.attr.licenses))
lines.append("")
lines.append("load(\"@io_bazel_rules_closure//closure:" +
lines.append("load(\"@stackb_rules_closure//closure:" +
"defs.bzl\", \"web_library\")")
lines.append("")
lines.append("web_library(")
Expand Down
2 changes: 1 addition & 1 deletion third_party/phantomjs/phantomjs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \
# --- end runfiles.bash initialization v3 ---


RUNFILES="$(rlocation io_bazel_rules_closure/.)"
RUNFILES="$(rlocation stackb_rules_closure/.)"

export LD_LIBRARY_PATH="${RUNFILES}/third_party/fontconfig/k8:${LD_LIBRARY_PATH:-}"
export LD_LIBRARY_PATH="${RUNFILES}/third_party/freetype/k8:${LD_LIBRARY_PATH}"
Expand Down