Skip to content

Commit

Permalink
docs: use @npm//@bazel for example load sites
Browse files Browse the repository at this point in the history
  • Loading branch information
mattem authored and alexeagle committed Aug 10, 2020
1 parent e5fc274 commit 88c19f1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions packages/labs/protobufjs/ts_proto_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ a `ts_library` can appear, such as in the `deps[]` of another `ts_library`.
Example:
```python
load("//packages/typescript:index.bzl", "ts_library", "ts_proto_library")
load("@npm//@bazel/typescript:index.bzl", "ts_library", "ts_proto_library")
proto_library(
name = "car_proto",
Expand Down Expand Up @@ -203,18 +203,18 @@ name the rule differently from the output file.
The JavaScript produced by protobuf.js has a runtime dependency on a support library.
Under devmode (e.g. `ts_devserver`, `karma_web_test_suite`) you'll need to include these scripts
in the `bootstrap` phase (before Require.js loads). You can use the label
`//packages/labs/protobufjs:bootstrap_scripts` to reference these scripts
`@npm//@bazel/labs/protobufjs:bootstrap_scripts` to reference these scripts
in the `bootstrap` attribute of `karma_web_test_suite` or `ts_devserver`.
To complete the example above, you could write a `karma_web_test_suite`:
```python
load("//packages/karma:index.bzl", "karma_web_test_suite")
load("@npm//@bazel/karma:index.bzl", "karma_web_test_suite")
karma_web_test_suite(
name = "test",
deps = ["test_lib"],
bootstrap = ["//packages/labs/protobufjs:bootstrap_scripts"],
bootstrap = ["@npm//@bazel/labs/protobufjs:bootstrap_scripts"],
browsers = [
"@io_bazel_rules_webtesting//browsers:chromium-local",
"@io_bazel_rules_webtesting//browsers:firefox-local",
Expand Down
2 changes: 1 addition & 1 deletion packages/rollup/rollup_bundle.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ See https://rollupjs.org/guide/en/#command-line-reference
Typical example:
```python
load("//packages/rollup:index.bzl", "rollup_bundle")
load("@npm//@bazel/rollup:index.bzl", "rollup_bundle")
rollup_bundle(
name = "bundle",
Expand Down
2 changes: 1 addition & 1 deletion packages/terser/terser_minified.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ _DOC = """Run the terser minifier.
Typical example:
```python
load("//packages/terser:index.bzl", "terser_minified")
load("@npm//@bazel/terser:index.bzl", "terser_minified")
terser_minified(
name = "out.min",
Expand Down

0 comments on commit 88c19f1

Please sign in to comment.