| <!DOCTYPE html> |
| <html itemscope itemtype="https://schema.org/WebPage" lang="en"> |
| <head> |
| <meta charset="utf-8"> |
| <meta content="IE=edge" http-equiv="X-UA-Compatible"> |
| <meta content="width=device-width, initial-scale=1" name="viewport"> |
| <link href="/rules_nodejs/Providers.html" rel="canonical"> |
| <link href="" rel="shortcut icon" type="image/png"> |
| |
| <title>rules_nodejs - Providers</title> |
| |
| <!-- Webfont --> |
| <link href="//fonts.googleapis.com/css?family=Source+Code+Pro:400,500,700|Open+Sans:400,600,700,800" rel="stylesheet"> |
| |
| <!-- Bootstrap --> |
| <link crossorigin="anonymous" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" |
| integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" rel="stylesheet"> |
| |
| <!-- Font Awesome --> |
| <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> |
| |
| <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> |
| <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> |
| <!--[if lt IE 9]> |
| <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> |
| <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
| <![endif]--> |
| |
| <!-- Custom stylesheet --> |
| <link href="/rules_nodejs/css/main.css" rel="stylesheet"> |
| |
| <!-- metadata --> |
| <meta content="rules_nodejs" name="og:title"/> |
| <meta content="JavaScript and NodeJS rules for Bazel" name="og:description"/> |
| </head> |
| |
| <body> |
| <nav class="navbar navbar-inverse navbar-fixed-top" id="common-nav"> |
| <div class="container"> |
| <!-- Brand and toggle get grouped for better mobile display --> |
| <div class="navbar-header"> |
| <button class="navbar-toggle collapsed" data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" |
| type="button"> |
| <span class="sr-only">Toggle navigation</span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| </button> |
| <a class="navbar-brand" href="/rules_nodejs/"> |
| <img class="navbar-logo" src="/rules_nodejs/images/bazel-navbar.svg"> |
| </a> |
| </div> |
| |
| <!-- Collect the nav links, forms, and other content for toggling --> |
| <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> |
| <form class="navbar-form navbar-right" action="/rules_nodejs/search.html" id="cse-search-box"> |
| <div class="form-group"> |
| <input type="hidden" name="cx" value="2735dc72dd157bd19"> |
| <input type="search" name="q" id="q" class="form-control input-sm" placeholder="Search"> |
| </div> |
| </form> |
| <ul class="nav navbar-nav navbar-right"> |
| <li><a href="https://github.com/bazelbuild/rules_nodejs">GitHub</a></li> |
| </ul> |
| </div><!-- /.navbar-collapse --> |
| </div><!-- /.container-fluid --> |
| </nav> |
| |
| |
| <div class="container vpad"> |
| <div class="row"> |
| <div class="col-md-2"> |
| <a aria-controls="sidebar-nav" |
| aria-expanded="false" class="btn btn-default btn-lg btn-block sidebar-toggle" data-toggle="collapse" |
| href="#sidebar-nav"> |
| <i class="glyphicon glyphicon-menu-hamburger"></i> Navigation |
| </a> |
| |
| <nav class="sidebar collapse" id="sidebar-nav"> |
| <select onchange="location.href=this.value"> |
| <option selected disabled hidden>Version: 3.x</option> |
| <option value="/rules_nodejs/Providers.html">3.x</option> |
| <option value="https://docs.aspect.dev/rules_nodejs/Providers.html">2.3</option> |
| </select> |
| |
| <h3>rules_nodejs</h3> |
| |
| <ul class="sidebar-nav"> |
| <li><a href="/rules_nodejs/">Introduction</a></li> |
| <li><a href="install.html">Installation</a></li> |
| <li><a href="repositories.html">Repositories</a></li> |
| <li><a href="dependencies.html">Dependencies</a></li> |
| <li><a href="debugging.html">Debugging</a></li> |
| <li><a href="stamping.html">Stamping</a></li> |
| <li><a href="changing-rules.html">Making changes to rules_nodejs</a></li> |
| <li><a href="examples.html">Examples</a></li> |
| </ul> |
| |
| <h3>Rules</h3> |
| <ul class="sidebar-nav"> |
| |
| |
| <li><a href="/rules_nodejs/Built-ins.html">Built-ins</a></li> |
| |
| |
| |
| <li><a href="/rules_nodejs/Concatjs.html">Concatjs</a></li> |
| |
| |
| |
| <li><a href="/rules_nodejs/Cypress.html">Cypress</a></li> |
| |
| |
| |
| <li><a href="/rules_nodejs/Jasmine.html">Jasmine</a></li> |
| |
| |
| |
| <li><a href="/rules_nodejs/Labs.html">Labs</a></li> |
| |
| |
| |
| <li><a href="/rules_nodejs/Protractor.html">Protractor</a></li> |
| |
| |
| |
| <li><a href="/rules_nodejs/Providers.html">Providers</a></li> |
| |
| |
| |
| <li><a href="/rules_nodejs/Rollup.html">Rollup</a></li> |
| |
| |
| |
| <li><a href="/rules_nodejs/Terser.html">Terser</a></li> |
| |
| |
| |
| <li><a href="/rules_nodejs/TypeScript.html">TypeScript</a></li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/rules_nodejs/esbuild.html">esbuild</a></li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| </ul> |
| |
| <h3>Community</h3> |
| <ul class="sidebar-nav"> |
| <li><a href="https://github.com/bazelbuild/rules_nodejs/blob/master/CONTRIBUTING.md">Contribute to |
| rules_nodejs</a></li> |
| <li><a href="https://slack.bazel.build">Join #javascript on Slack</a></li> |
| <li><a href="https://github.com/bazelbuild/rules_nodejs/issues">Issue Tracker</a></li> |
| <li><a href="https://github.com/bazelbuild/rules_nodejs">Github</a></li> |
| </ul> |
| </nav> |
| </div> |
| |
| |
| <div class="col-md-8"> |
| <div class="content"> |
| <!-- ********************* |
| DO NOT EDIT THIS FILE |
| It is a generated build output from Stardoc. |
| Instead you must edit the .bzl file where the rules are declared, |
| or possibly a markdown file next to the .bzl file |
| ********************* --> |
| |
| <p>Public providers, aspects and helpers that are shipped in the built-in build_bazel_rules_nodejs repository.</p> |
| |
| <p>Users should not load files under “/internal”</p> |
| |
| <h2 id="declarationinfo">DeclarationInfo</h2> |
| |
| <p><strong>USAGE</strong></p> |
| |
| <pre> |
| DeclarationInfo(<a href="#DeclarationInfo-declarations">declarations</a>, <a href="#DeclarationInfo-transitive_declarations">transitive_declarations</a>, <a href="#DeclarationInfo-type_blacklisted_declarations">type_blacklisted_declarations</a>) |
| </pre> |
| |
| <p>The DeclarationInfo provider allows JS rules to communicate typing information. |
| TypeScript’s .d.ts files are used as the interop format for describing types. |
| package.json files are included as well, as TypeScript needs to read the “typings” property.</p> |
| |
| <p>Do not create DeclarationInfo instances directly, instead use the declaration_info factory function.</p> |
| |
| <p>Note: historically this was a subset of the string-typed “typescript” provider.</p> |
| |
| <p><strong>FIELDS</strong></p> |
| |
| <h4 id="DeclarationInfo-declarations">declarations</h4> |
| |
| <p>A depset of typings files produced by this rule</p> |
| <h4 id="DeclarationInfo-transitive_declarations">transitive_declarations</h4> |
| |
| <p>A depset of typings files produced by this rule and all its transitive dependencies. |
| This prevents needing an aspect in rules that consume the typings, which improves performance.</p> |
| <h4 id="DeclarationInfo-type_blacklisted_declarations">type_blacklisted_declarations</h4> |
| |
| <p>A depset of .d.ts files that we should not use to infer JSCompiler types (via tsickle)</p> |
| |
| <h2 id="directoryfilepathinfo">DirectoryFilePathInfo</h2> |
| |
| <p><strong>USAGE</strong></p> |
| |
| <pre> |
| DirectoryFilePathInfo(<a href="#DirectoryFilePathInfo-directory">directory</a>, <a href="#DirectoryFilePathInfo-path">path</a>) |
| </pre> |
| |
| <p>Joins a label pointing to a TreeArtifact with a path nested within that directory.</p> |
| |
| <p><strong>FIELDS</strong></p> |
| |
| <h4 id="DirectoryFilePathInfo-directory">directory</h4> |
| |
| <p>a TreeArtifact (ctx.actions.declare_directory)</p> |
| <h4 id="DirectoryFilePathInfo-path">path</h4> |
| |
| <p>path relative to the directory</p> |
| |
| <h2 id="externalnpmpackageinfo">ExternalNpmPackageInfo</h2> |
| |
| <p><strong>USAGE</strong></p> |
| |
| <pre> |
| ExternalNpmPackageInfo(<a href="#ExternalNpmPackageInfo-direct_sources">direct_sources</a>, <a href="#ExternalNpmPackageInfo-path">path</a>, <a href="#ExternalNpmPackageInfo-sources">sources</a>, <a href="#ExternalNpmPackageInfo-workspace">workspace</a>) |
| </pre> |
| |
| <p>Provides information about one or more external npm packages</p> |
| |
| <p><strong>FIELDS</strong></p> |
| |
| <h4 id="ExternalNpmPackageInfo-direct_sources">direct_sources</h4> |
| |
| <p>Depset of direct source files in these external npm package(s)</p> |
| <h4 id="ExternalNpmPackageInfo-path">path</h4> |
| |
| <p>The local workspace path that these external npm deps should be linked at. If empty, they will be linked at the root.</p> |
| <h4 id="ExternalNpmPackageInfo-sources">sources</h4> |
| |
| <p>Depset of direct & transitive source files in these external npm package(s) and transitive dependencies</p> |
| <h4 id="ExternalNpmPackageInfo-workspace">workspace</h4> |
| |
| <p>The workspace name that these external npm package(s) are provided from</p> |
| |
| <h2 id="jsecmascriptmoduleinfo">JSEcmaScriptModuleInfo</h2> |
| |
| <p><strong>USAGE</strong></p> |
| |
| <pre> |
| JSEcmaScriptModuleInfo(<a href="#JSEcmaScriptModuleInfo-direct_sources">direct_sources</a>, <a href="#JSEcmaScriptModuleInfo-sources">sources</a>) |
| </pre> |
| |
| <p>JavaScript files (and sourcemaps) that are intended to be consumed by downstream tooling.</p> |
| |
| <p>They should use modern syntax and ESModules. |
| These files should typically be named “foo.mjs”</p> |
| |
| <p>Historical note: this was the typescript.es6_sources output</p> |
| |
| <p><strong>FIELDS</strong></p> |
| |
| <h4 id="JSEcmaScriptModuleInfo-direct_sources">direct_sources</h4> |
| |
| <p>Depset of direct JavaScript files and sourcemaps</p> |
| <h4 id="JSEcmaScriptModuleInfo-sources">sources</h4> |
| |
| <p>Depset of direct and transitive JavaScript files and sourcemaps</p> |
| |
| <h2 id="jsmoduleinfo">JSModuleInfo</h2> |
| |
| <p><strong>USAGE</strong></p> |
| |
| <pre> |
| JSModuleInfo(<a href="#JSModuleInfo-direct_sources">direct_sources</a>, <a href="#JSModuleInfo-sources">sources</a>) |
| </pre> |
| |
| <p>JavaScript files and sourcemaps.</p> |
| |
| <p><strong>FIELDS</strong></p> |
| |
| <h4 id="JSModuleInfo-direct_sources">direct_sources</h4> |
| |
| <p>Depset of direct JavaScript files and sourcemaps</p> |
| <h4 id="JSModuleInfo-sources">sources</h4> |
| |
| <p>Depset of direct and transitive JavaScript files and sourcemaps</p> |
| |
| <h2 id="jsnamedmoduleinfo">JSNamedModuleInfo</h2> |
| |
| <p><strong>USAGE</strong></p> |
| |
| <pre> |
| JSNamedModuleInfo(<a href="#JSNamedModuleInfo-direct_sources">direct_sources</a>, <a href="#JSNamedModuleInfo-sources">sources</a>) |
| </pre> |
| |
| <p>JavaScript files whose module name is self-contained.</p> |
| |
| <p>For example named AMD/UMD or goog.module format. |
| These files can be efficiently served with the concatjs bundler. |
| These outputs should be named “foo.umd.js” |
| (note that renaming it from “foo.js” doesn’t affect the module id)</p> |
| |
| <p>Historical note: this was the typescript.es5_sources output.</p> |
| |
| <p><strong>FIELDS</strong></p> |
| |
| <h4 id="JSNamedModuleInfo-direct_sources">direct_sources</h4> |
| |
| <p>Depset of direct JavaScript files and sourcemaps</p> |
| <h4 id="JSNamedModuleInfo-sources">sources</h4> |
| |
| <p>Depset of direct and transitive JavaScript files and sourcemaps</p> |
| |
| <h2 id="linkablepackageinfo">LinkablePackageInfo</h2> |
| |
| <p><strong>USAGE</strong></p> |
| |
| <pre> |
| LinkablePackageInfo(<a href="#LinkablePackageInfo-files">files</a>, <a href="#LinkablePackageInfo-package_name">package_name</a>, <a href="#LinkablePackageInfo-package_path">package_path</a>, <a href="#LinkablePackageInfo-path">path</a>, <a href="#LinkablePackageInfo-_tslibrary">_tslibrary</a>) |
| </pre> |
| |
| <p>The LinkablePackageInfo provider provides information to the linker for linking pkg_npm built packages</p> |
| |
| <p><strong>FIELDS</strong></p> |
| |
| <h4 id="LinkablePackageInfo-files">files</h4> |
| |
| <p>Depset of files in this package (must all be contained within path)</p> |
| <h4 id="LinkablePackageInfo-package_name">package_name</h4> |
| |
| <p>The package name.</p> |
| |
| <p>This field is optional. If not set, the target can be made linkable to a package_name with the npm_link rule.</p> |
| <h4 id="LinkablePackageInfo-package_path">package_path</h4> |
| |
| <p>The directory in the workspace to link to.</p> |
| |
| <p>If set, link the 1st party dependencies to the node_modules under the package path specified. |
| If unset, the default is to link to the node_modules root of the workspace.</p> |
| <h4 id="LinkablePackageInfo-path">path</h4> |
| |
| <p>The path to link to.</p> |
| |
| <p>Path must be relative to execroot/wksp. It can either an output dir path such as,</p> |
| |
| <p><code class="language-plaintext highlighter-rouge">bazel-out/<platform>-<build>/bin/path/to/package</code> or |
| <code class="language-plaintext highlighter-rouge">bazel-out/<platform>-<build>/bin/external/external_wksp>/path/to/package</code></p> |
| |
| <p>or a source file path such as,</p> |
| |
| <p><code class="language-plaintext highlighter-rouge">path/to/package</code> or |
| <code class="language-plaintext highlighter-rouge">external/<external_wksp>/path/to/package</code></p> |
| <h4 id="LinkablePackageInfo-_tslibrary">_tslibrary</h4> |
| |
| <p>For internal use only</p> |
| |
| <h2 id="nodecontextinfo">NodeContextInfo</h2> |
| |
| <p><strong>USAGE</strong></p> |
| |
| <pre> |
| NodeContextInfo(<a href="#NodeContextInfo-stamp">stamp</a>) |
| </pre> |
| |
| <p>Provides data about the build context, like config_setting’s</p> |
| |
| <p><strong>FIELDS</strong></p> |
| |
| <h4 id="NodeContextInfo-stamp">stamp</h4> |
| |
| <p>If stamping is enabled</p> |
| |
| <h2 id="noderuntimedepsinfo">NodeRuntimeDepsInfo</h2> |
| |
| <p><strong>USAGE</strong></p> |
| |
| <pre> |
| NodeRuntimeDepsInfo(<a href="#NodeRuntimeDepsInfo-deps">deps</a>, <a href="#NodeRuntimeDepsInfo-pkgs">pkgs</a>) |
| </pre> |
| |
| <p>Stores runtime dependencies of a nodejs_binary or nodejs_test</p> |
| |
| <p>These are files that need to be found by the node module resolver at runtime.</p> |
| |
| <p>Historically these files were passed using the Runfiles mechanism. |
| However runfiles has a big performance penalty of creating a symlink forest |
| with FS API calls for every file in node_modules. |
| It also causes there to be separate node_modules trees under each binary. This |
| prevents user-contributed modules passed as deps[] to a particular action from |
| being found by node module resolver, which expects everything in one tree.</p> |
| |
| <p>In node, this resolution is done dynamically by assuming a node_modules |
| tree will exist on disk, so we assume node actions/binary/test executions will |
| do the same.</p> |
| |
| <p><strong>FIELDS</strong></p> |
| |
| <h4 id="NodeRuntimeDepsInfo-deps">deps</h4> |
| |
| <p>depset of runtime dependency labels</p> |
| <h4 id="NodeRuntimeDepsInfo-pkgs">pkgs</h4> |
| |
| <p>list of labels of packages that provide ExternalNpmPackageInfo</p> |
| |
| <h2 id="npmpackageinfo">NpmPackageInfo</h2> |
| |
| <p><strong>USAGE</strong></p> |
| |
| <pre> |
| NpmPackageInfo(<a href="#NpmPackageInfo-direct_sources">direct_sources</a>, <a href="#NpmPackageInfo-path">path</a>, <a href="#NpmPackageInfo-sources">sources</a>, <a href="#NpmPackageInfo-workspace">workspace</a>) |
| </pre> |
| |
| <p>Provides information about one or more external npm packages</p> |
| |
| <p><strong>FIELDS</strong></p> |
| |
| <h4 id="NpmPackageInfo-direct_sources">direct_sources</h4> |
| |
| <p>Depset of direct source files in these external npm package(s)</p> |
| <h4 id="NpmPackageInfo-path">path</h4> |
| |
| <p>The local workspace path that these external npm deps should be linked at. If empty, they will be linked at the root.</p> |
| <h4 id="NpmPackageInfo-sources">sources</h4> |
| |
| <p>Depset of direct & transitive source files in these external npm package(s) and transitive dependencies</p> |
| <h4 id="NpmPackageInfo-workspace">workspace</h4> |
| |
| <p>The workspace name that these external npm package(s) are provided from</p> |
| |
| <h2 id="declaration_info">declaration_info</h2> |
| |
| <p><strong>USAGE</strong></p> |
| |
| <pre> |
| declaration_info(<a href="#declaration_info-declarations">declarations</a>, <a href="#declaration_info-deps">deps</a>) |
| </pre> |
| |
| <p>Constructs a DeclarationInfo including all transitive files needed to type-check from DeclarationInfo providers in a list of deps.</p> |
| |
| <p><strong>PARAMETERS</strong></p> |
| |
| <h4 id="declaration_info-declarations">declarations</h4> |
| |
| <p>list of typings files</p> |
| |
| <h4 id="declaration_info-deps">deps</h4> |
| |
| <p>list of labels of dependencies where we should collect their DeclarationInfo to pass transitively</p> |
| |
| <p>Defaults to <code class="language-plaintext highlighter-rouge">[]</code></p> |
| |
| <h2 id="js_ecma_script_module_info">js_ecma_script_module_info</h2> |
| |
| <p><strong>USAGE</strong></p> |
| |
| <pre> |
| js_ecma_script_module_info(<a href="#js_ecma_script_module_info-sources">sources</a>, <a href="#js_ecma_script_module_info-deps">deps</a>) |
| </pre> |
| |
| <p>Constructs a JSEcmaScriptModuleInfo including all transitive sources from JSEcmaScriptModuleInfo providers in a list of deps.</p> |
| |
| <p>Returns a single JSEcmaScriptModuleInfo.</p> |
| |
| <p><strong>PARAMETERS</strong></p> |
| |
| <h4 id="js_ecma_script_module_info-sources">sources</h4> |
| |
| <h4 id="js_ecma_script_module_info-deps">deps</h4> |
| |
| <p>Defaults to <code class="language-plaintext highlighter-rouge">[]</code></p> |
| |
| <h2 id="js_module_info">js_module_info</h2> |
| |
| <p><strong>USAGE</strong></p> |
| |
| <pre> |
| js_module_info(<a href="#js_module_info-sources">sources</a>, <a href="#js_module_info-deps">deps</a>) |
| </pre> |
| |
| <p>Constructs a JSModuleInfo including all transitive sources from JSModuleInfo providers in a list of deps.</p> |
| |
| <p>Returns a single JSModuleInfo.</p> |
| |
| <p><strong>PARAMETERS</strong></p> |
| |
| <h4 id="js_module_info-sources">sources</h4> |
| |
| <h4 id="js_module_info-deps">deps</h4> |
| |
| <p>Defaults to <code class="language-plaintext highlighter-rouge">[]</code></p> |
| |
| <h2 id="js_named_module_info">js_named_module_info</h2> |
| |
| <p><strong>USAGE</strong></p> |
| |
| <pre> |
| js_named_module_info(<a href="#js_named_module_info-sources">sources</a>, <a href="#js_named_module_info-deps">deps</a>) |
| </pre> |
| |
| <p>Constructs a JSNamedModuleInfo including all transitive sources from JSNamedModuleInfo providers in a list of deps.</p> |
| |
| <p>Returns a single JSNamedModuleInfo.</p> |
| |
| <p><strong>PARAMETERS</strong></p> |
| |
| <h4 id="js_named_module_info-sources">sources</h4> |
| |
| <h4 id="js_named_module_info-deps">deps</h4> |
| |
| <p>Defaults to <code class="language-plaintext highlighter-rouge">[]</code></p> |
| |
| <h2 id="run_node">run_node</h2> |
| |
| <p><strong>USAGE</strong></p> |
| |
| <pre> |
| run_node(<a href="#run_node-ctx">ctx</a>, <a href="#run_node-inputs">inputs</a>, <a href="#run_node-arguments">arguments</a>, <a href="#run_node-executable">executable</a>, <a href="#run_node-chdir">chdir</a>, <a href="#run_node-kwargs">kwargs</a>) |
| </pre> |
| |
| <p>Helper to replace ctx.actions.run</p> |
| |
| <p>This calls node programs with a node_modules directory in place</p> |
| |
| <p><strong>PARAMETERS</strong></p> |
| |
| <h4 id="run_node-ctx">ctx</h4> |
| |
| <p>rule context from the calling rule implementation function</p> |
| |
| <h4 id="run_node-inputs">inputs</h4> |
| |
| <p>list or depset of inputs to the action</p> |
| |
| <h4 id="run_node-arguments">arguments</h4> |
| |
| <p>list or ctx.actions.Args object containing arguments to pass to the executable</p> |
| |
| <h4 id="run_node-executable">executable</h4> |
| |
| <p>stringy representation of the executable this action will run, eg eg. “my_executable” rather than ctx.executable.my_executable</p> |
| |
| <h4 id="run_node-chdir">chdir</h4> |
| |
| <p>directory we should change to be the working dir</p> |
| |
| <p>Defaults to <code class="language-plaintext highlighter-rouge">None</code></p> |
| |
| <h4 id="run_node-kwargs">kwargs</h4> |
| |
| <p>all other args accepted by ctx.actions.run</p> |
| |
| <h2 id="node_modules_aspect">node_modules_aspect</h2> |
| |
| <p><strong>USAGE</strong></p> |
| |
| <pre> |
| node_modules_aspect(<a href="#node_modules_aspect-name">name</a>) |
| </pre> |
| |
| <p><strong>ASPECT ATTRIBUTES</strong></p> |
| |
| <h4>deps</h4> |
| |
| <p><strong>ATTRIBUTES</strong></p> |
| |
| <h4 id="node_modules_aspect-name">name</h4> |
| |
| <p>(<em><a href="https://bazel.build/docs/build-ref.html#name">Name</a>, {util.mandatoryString(name: “name” |
| doc_string: “A unique name for this target.” |
| type: NAME |
| mandatory: true |
| )}</em>) |
| A unique name for this target.</p> |
| |
| |
| </div> |
| </div> |
| |
| <div class="col-md-2 sticky-sidebar"> |
| <div class="right-sidebar"> |
| <ul class="gh-links"> |
| <li> |
| <i class="fa fa-github"></i> |
| <a href="https://github.com/bazelbuild/rules_nodejs/issues/new?title=Documentation issue: Providers&labels=question/docs">Create |
| issue</a> |
| </li> |
| |
| </ul> |
| <ul class="section-nav"> |
| <li class="toc-entry toc-h2"><a href="#declarationinfo">DeclarationInfo</a></li> |
| <li class="toc-entry toc-h2"><a href="#directoryfilepathinfo">DirectoryFilePathInfo</a></li> |
| <li class="toc-entry toc-h2"><a href="#externalnpmpackageinfo">ExternalNpmPackageInfo</a></li> |
| <li class="toc-entry toc-h2"><a href="#jsecmascriptmoduleinfo">JSEcmaScriptModuleInfo</a></li> |
| <li class="toc-entry toc-h2"><a href="#jsmoduleinfo">JSModuleInfo</a></li> |
| <li class="toc-entry toc-h2"><a href="#jsnamedmoduleinfo">JSNamedModuleInfo</a></li> |
| <li class="toc-entry toc-h2"><a href="#linkablepackageinfo">LinkablePackageInfo</a></li> |
| <li class="toc-entry toc-h2"><a href="#nodecontextinfo">NodeContextInfo</a></li> |
| <li class="toc-entry toc-h2"><a href="#noderuntimedepsinfo">NodeRuntimeDepsInfo</a></li> |
| <li class="toc-entry toc-h2"><a href="#npmpackageinfo">NpmPackageInfo</a></li> |
| <li class="toc-entry toc-h2"><a href="#declaration_info">declaration_info</a></li> |
| <li class="toc-entry toc-h2"><a href="#js_ecma_script_module_info">js_ecma_script_module_info</a></li> |
| <li class="toc-entry toc-h2"><a href="#js_module_info">js_module_info</a></li> |
| <li class="toc-entry toc-h2"><a href="#js_named_module_info">js_named_module_info</a></li> |
| <li class="toc-entry toc-h2"><a href="#run_node">run_node</a></li> |
| <li class="toc-entry toc-h2"><a href="#node_modules_aspect">node_modules_aspect</a></li> |
| </ul> |
| </div> |
| </div> |
| </div> |
| </div> |
| |
| <footer class="footer"> |
| <div class="container"> |
| <div class="row"> |
| <div class="col-lg-8"> |
| <p class="text-muted">© 2021 The rules_nodejs authors</p> |
| </div> |
| </div> |
| </div> |
| |
| </footer> |
| |
| <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> |
| <!-- Include all compiled plugins (below), or include individual files as needed --> |
| <script crossorigin="anonymous" |
| integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" |
| src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
| |
| <!-- Anchor JS --> |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.2.0/anchor.min.js" type="text/javascript"></script> |
| <script> |
| // Automatically add anchors and links to all header elements that don't already have them. |
| anchors.options = { placement: 'left' }; |
| anchors.add(); |
| </script> |
| |
| <script> |
| var shiftWindow = function () { |
| if (location.hash.length !== 0) { |
| window.scrollBy(0, -50); |
| } |
| }; |
| window.addEventListener("hashchange", shiftWindow); |
| |
| var highlightCurrentSidebarNav = function () { |
| var href = location.pathname; |
| var item = $('#sidebar-nav [href$="' + href + '"]'); |
| if (item) { |
| var li = item.parent(); |
| li.addClass("active"); |
| |
| if (li.parent() && li.parent().is("ul")) { |
| do { |
| var ul = li.parent(); |
| if (ul.hasClass("collapse")) { |
| ul.collapse("show"); |
| } |
| li = ul.parent(); |
| } while (li && li.is("li")); |
| } |
| } |
| }; |
| |
| $(document).ready(function () { |
| // Scroll to anchor of location hash, adjusted for fixed navbar. |
| window.setTimeout(function () { |
| shiftWindow(); |
| }, 1); |
| |
| // Flip the caret when submenu toggles are clicked. |
| $(".sidebar-submenu").on("show.bs.collapse", function () { |
| var toggle = $('[href$="#' + $(this).attr('id') + '"]'); |
| if (toggle) { |
| toggle.addClass("dropup"); |
| } |
| }); |
| $(".sidebar-submenu").on("hide.bs.collapse", function () { |
| var toggle = $('[href$="#' + $(this).attr('id') + '"]'); |
| if (toggle) { |
| toggle.removeClass("dropup"); |
| } |
| }); |
| |
| // Highlight the current page on the sidebar nav. |
| highlightCurrentSidebarNav(); |
| }); |
| </script> |
| |
| </body> |
| </html> |
| |