Skip to content

Commit

Permalink
Clarify install instructions to fix a pitfall (#648)
Browse files Browse the repository at this point in the history
Fixes #647
  • Loading branch information
alexeagle authored and gregmagolan committed Apr 3, 2019
1 parent b366e0e commit 079501a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ See sections below for details and alternative methods.
install_bazel_dependencies()
```

1. Since Bazel manages a copy of the node_modules, we don't want it to discover configuration in your locally installed copy. Create a file `.bazelignore` in the root of your repo containing this line:
```
node_modules
```
1. Create a file `BUILD.bazel` in the root of your repo, next to the `package.json` file. It can be empty for now.
1. In your `package.json`, find the `"scripts"` section, or create one.
Expand Down
2 changes: 2 additions & 0 deletions packages/typescript/docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ $ yarn add -D @bazel/typescript
$ npm install --save-dev @bazel/typescript
```

Watch for any peerDependency warnings - we assume you have already installed the `typescript` package from npm.

Your `WORKSPACE` should declare a `yarn_install` or `npm_install` rule named `npm`.
It should then install the rules found in the npm packages using the `install_bazel_dependencies` function.
See https://github.com/bazelbuild/rules_nodejs/#quickstart
Expand Down

0 comments on commit 079501a

Please sign in to comment.