| <!-- Generated with Stardoc: http://skydoc.bazel.build --> |
| |
| Build rules generated by `npm_translate_lock` |
| ============================================= |
| |
| These are loaded from the external repository created by `npm_translate_lock` based on the name provided. |
| |
| For example, if you run `npm_translate_lock(name = "npm")` then these rules can be loaded with |
| |
| ``` |
| load("@npm//:defs.bzl", "npm_link_targets", "npm_link_all_packages") |
| ``` |
| |
| <a id="npm_link_all_packages"></a> |
| |
| ## npm_link_all_packages |
| |
| <pre> |
| npm_link_all_packages(<a href="#npm_link_all_packages-name">name</a>, <a href="#npm_link_all_packages-imported_links">imported_links</a>) |
| </pre> |
| |
| Generated list of npm_link_package() target generators and first-party linked packages corresponding to the packages in {pnpm_lock_label} |
| |
| If you use manually-written [`npm_import`](/docs/npm_import.md#npm_import) you can link these as well, for example, |
| |
| load("@npm//:defs.bzl", "npm_link_all_packages") |
| load("@npm_meaning-of-life__links//:defs.bzl", npm_link_meaning_of_life = "npm_link_imported_package") |
| |
| npm_link_all_packages( |
| name = "node_modules", |
| imported_links = [ |
| npm_link_meaning_of_life, |
| ], |
| ) |
| |
| |
| **PARAMETERS** |
| |
| |
| | Name | Description | Default Value | |
| | :------------- | :------------- | :------------- | |
| | <a id="npm_link_all_packages-name"></a>name | name of catch all target to generate for all packages linked | `"node_modules"` | |
| | <a id="npm_link_all_packages-imported_links"></a>imported_links | optional list link functions from manually imported packages that were fetched with npm_import rules. | `[]` | |
| |
| |
| <a id="npm_link_targets"></a> |
| |
| ## npm_link_targets |
| |
| <pre> |
| npm_link_targets(<a href="#npm_link_targets-name">name</a>, <a href="#npm_link_targets-package">package</a>) |
| </pre> |
| |
| Generated list of target names that are linked by npm_link_all_packages() |
| |
| **PARAMETERS** |
| |
| |
| | Name | Description | Default Value | |
| | :------------- | :------------- | :------------- | |
| | <a id="npm_link_targets-name"></a>name | name of catch all target to generate for all packages linked | `"node_modules"` | |
| | <a id="npm_link_targets-package"></a>package | Bazel package to generate targets names for.<br><br>Set to an empty string "" to specify the root package.<br><br>If unspecified, the current package (`native.package_name()`) is used. | `None` | |
| |
| **RETURNS** |
| |
| A list of target names that are linked by npm_link_all_packages() |
| |
| |