diff --git a/README.md b/README.md index f54ff553c3..7bad64126b 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/packages/typescript/docs/install.md b/packages/typescript/docs/install.md index b9173cc42c..91152f70e8 100644 --- a/packages/typescript/docs/install.md +++ b/packages/typescript/docs/install.md @@ -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