Skip to content

Commit

Permalink
fix(docs): fix formatting of nodejs_binary#chdir
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eagle authored and alexeagle committed Feb 3, 2021
1 parent c31c0b6 commit 1caced8
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 64 deletions.
56 changes: 30 additions & 26 deletions docs/Built-ins.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 28 additions & 24 deletions docs/Built-ins.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,25 +273,27 @@ Runs some JavaScript code in NodeJS.
<h4 id="nodejs_binary-chdir">chdir</h4>

(*String*): Working directory to run the binary or test in, relative to the workspace.
By default, Bazel always runs in the workspace root.
Due to implementation details, this argument must be underneath this package directory.
By default, Bazel always runs in the workspace root.
Due to implementation details, this argument must be underneath this package directory.

To run in the directory containing the `nodejs_binary` / `nodejs_test` use
`chdir = package_name()`
(or if you're in a macro, use `native.package_name()`)
WARNING: this will affect other paths passed to the program, either as arguments or in configuration files,
which are workspace-relative.
You may need `../../` segments to re-relativize such paths to the new working directory.
To run in the directory containing the `nodejs_binary` / `nodejs_test`, use

chdir = package_name()

(or if you're in a macro, use `native.package_name()`)

WARNING: this will affect other paths passed to the program, either as arguments or in configuration files,
which are workspace-relative.
You may need `../../` segments to re-relativize such paths to the new working directory.

Defaults to `""`

<h4 id="nodejs_binary-configuration_env_vars">configuration_env_vars</h4>

(*List of strings*): Pass these configuration environment variables to the resulting binary.
Chooses a subset of the configuration environment variables (taken from `ctx.var`), which also
includes anything specified via the --define flag.
Note, this can lead to different outputs produced by this rule.
Chooses a subset of the configuration environment variables (taken from `ctx.var`), which also
includes anything specified via the --define flag.
Note, this can lead to different outputs produced by this rule.

Defaults to `[]`

Expand Down Expand Up @@ -513,25 +515,27 @@ remote debugger.
<h4 id="nodejs_test-chdir">chdir</h4>

(*String*): Working directory to run the binary or test in, relative to the workspace.
By default, Bazel always runs in the workspace root.
Due to implementation details, this argument must be underneath this package directory.
By default, Bazel always runs in the workspace root.
Due to implementation details, this argument must be underneath this package directory.

To run in the directory containing the `nodejs_binary` / `nodejs_test` use
`chdir = package_name()`
(or if you're in a macro, use `native.package_name()`)
WARNING: this will affect other paths passed to the program, either as arguments or in configuration files,
which are workspace-relative.
You may need `../../` segments to re-relativize such paths to the new working directory.
To run in the directory containing the `nodejs_binary` / `nodejs_test`, use

chdir = package_name()

(or if you're in a macro, use `native.package_name()`)

WARNING: this will affect other paths passed to the program, either as arguments or in configuration files,
which are workspace-relative.
You may need `../../` segments to re-relativize such paths to the new working directory.

Defaults to `""`

<h4 id="nodejs_test-configuration_env_vars">configuration_env_vars</h4>

(*List of strings*): Pass these configuration environment variables to the resulting binary.
Chooses a subset of the configuration environment variables (taken from `ctx.var`), which also
includes anything specified via the --define flag.
Note, this can lead to different outputs produced by this rule.
Chooses a subset of the configuration environment variables (taken from `ctx.var`), which also
includes anything specified via the --define flag.
Note, this can lead to different outputs produced by this rule.

Defaults to `[]`

Expand Down
30 changes: 16 additions & 14 deletions internal/node/node.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -344,23 +344,25 @@ fi
_NODEJS_EXECUTABLE_ATTRS = {
"chdir": attr.string(
doc = """Working directory to run the binary or test in, relative to the workspace.
By default, Bazel always runs in the workspace root.
Due to implementation details, this argument must be underneath this package directory.
To run in the directory containing the `nodejs_binary` / `nodejs_test` use
`chdir = package_name()`
(or if you're in a macro, use `native.package_name()`)
WARNING: this will affect other paths passed to the program, either as arguments or in configuration files,
which are workspace-relative.
You may need `../../` segments to re-relativize such paths to the new working directory.
""",
By default, Bazel always runs in the workspace root.
Due to implementation details, this argument must be underneath this package directory.
To run in the directory containing the `nodejs_binary` / `nodejs_test`, use
chdir = package_name()
(or if you're in a macro, use `native.package_name()`)
WARNING: this will affect other paths passed to the program, either as arguments or in configuration files,
which are workspace-relative.
You may need `../../` segments to re-relativize such paths to the new working directory.
""",
),
"configuration_env_vars": attr.string_list(
doc = """Pass these configuration environment variables to the resulting binary.
Chooses a subset of the configuration environment variables (taken from `ctx.var`), which also
includes anything specified via the --define flag.
Note, this can lead to different outputs produced by this rule.""",
Chooses a subset of the configuration environment variables (taken from `ctx.var`), which also
includes anything specified via the --define flag.
Note, this can lead to different outputs produced by this rule.""",
default = [],
),
"data": attr.label_list(
Expand Down

0 comments on commit 1caced8

Please sign in to comment.