Skip to content

Commit

Permalink
docs: update docs for release
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Feb 7, 2020
1 parent ed4454c commit 37cc0bd
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
bazel: 2.1.0rc4
bazel: 2.1.0
tasks:
ubuntu1604:
name: ubuntu1604
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0rc4
2.1.0
40 changes: 31 additions & 9 deletions docs/Built-ins.md
Original file line number Diff line number Diff line change
Expand Up @@ -594,11 +594,15 @@ Defaults to `[]`

Runs npm install during workspace setup.

This rule will set the environment variable `BAZEL_NPM_INSTALL` to '1' (unless it
set to another value in the environment attribute). Scripts may use to this to
check if yarn is being run by the `npm_install` repository rule.


### Usage

```
npm_install(name, always_hide_bazel_files, args, data, included_files, manual_build_file_contents, package_json, package_lock_json, quiet, symlink_node_modules, timeout)
npm_install(name, always_hide_bazel_files, args, data, environment, included_files, manual_build_file_contents, package_json, package_lock_json, quiet, symlink_node_modules, timeout)
```


Expand All @@ -609,6 +613,9 @@ npm_install(name, always_hide_bazel_files, args, data, included_files, manual_bu
#### `always_hide_bazel_files`
(*Boolean*): Always hide Bazel build files such as `BUILD` and BUILD.bazel` by prefixing them with `_`.

This is only needed in Bazel 2.0 or earlier.
We recommend upgrading to a later version to avoid the problem this works around.

Defaults to False, in which case Bazel files are _not_ hidden when `symlink_node_modules`
is True. In this case, the rule will report an error when there are Bazel files detected
in npm packages.
Expand Down Expand Up @@ -654,6 +661,11 @@ the dependency manager will run in the package.json location.

Defaults to `[]`

#### `environment`
(*<a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a>*): Environment variables to set before calling the package manager.

Defaults to `{}`

#### `included_files`
(*List of strings*): List of file extensions to be included in the npm package targets.

Expand Down Expand Up @@ -881,11 +893,15 @@ Defaults to `[]`

Runs yarn install during workspace setup.

This rule will set the environment variable `BAZEL_YARN_INSTALL` to '1' (unless it
set to another value in the environment attribute). Scripts may use to this to
check if yarn is being run by the `yarn_install` repository rule.


### Usage

```
yarn_install(name, always_hide_bazel_files, args, data, included_files, manual_build_file_contents, package_json, quiet, symlink_node_modules, timeout, use_global_yarn_cache, yarn_lock)
yarn_install(name, always_hide_bazel_files, args, data, environment, included_files, manual_build_file_contents, package_json, quiet, symlink_node_modules, timeout, use_global_yarn_cache, yarn_lock)
```


Expand All @@ -896,6 +912,9 @@ yarn_install(name, always_hide_bazel_files, args, data, included_files, manual_b
#### `always_hide_bazel_files`
(*Boolean*): Always hide Bazel build files such as `BUILD` and BUILD.bazel` by prefixing them with `_`.

This is only needed in Bazel 2.0 or earlier.
We recommend upgrading to a later version to avoid the problem this works around.

Defaults to False, in which case Bazel files are _not_ hidden when `symlink_node_modules`
is True. In this case, the rule will report an error when there are Bazel files detected
in npm packages.
Expand Down Expand Up @@ -941,6 +960,11 @@ the dependency manager will run in the package.json location.

Defaults to `[]`

#### `environment`
(*<a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a>*): Environment variables to set before calling the package manager.

Defaults to `{}`

#### `included_files`
(*List of strings*): List of file extensions to be included in the npm package targets.

Expand Down Expand Up @@ -1029,14 +1053,12 @@ Defaults to `True`

Verify the users Bazel version is at least the given one.

This should be called from the `WORKSPACE` file so that the build fails as
early as possible. For example:
This can be used in rule implementations that depend on changes in Bazel,
to warn users about a mismatch between the rule and their installed Bazel
version.

```
# in WORKSPACE:
load("@build_bazel_rules_nodejs//:index.bzl", "check_bazel_version")
check_bazel_version("0.26.0")
```
This should *not* be used in users WORKSPACE files. To locally pin your
Bazel version, just create the .bazelversion file in your workspace.



Expand Down
2 changes: 2 additions & 0 deletions docs/TypeScript.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ alias(
)
```

Make sure to remove the `--noEmit` compiler option from your `tsconfig.json`. This is not compatible with the `ts_library` rule.


## Self-managed npm dependencies

Expand Down
2 changes: 1 addition & 1 deletion index.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ VERSION = "1.2.4"
# against.
# This version should be updated together with the version of the Bazel
# in .bazelversion. This is asserted in //internal:bazel_version_test.
BAZEL_VERSION = "2.1.0rc4"
BAZEL_VERSION = "2.1.0"

# Versions of Bazel which users should be able to use.
# Ensures we don't break backwards-compatibility,
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -u -e -o pipefail
# $ npm login --registry https://wombat-dressing-room.appspot.com

readonly NPM_COMMAND=${1:-publish}
readonly BAZEL_BIN=./node_modules/.bin/bazel
readonly BAZEL_BIN=./node_modules/.bin/bazelisk

# Use a new output_base so we get a clean build
# Bazel can't know if the git metadata changed
Expand Down

0 comments on commit 37cc0bd

Please sign in to comment.