diff --git a/DEV_ENVIRONMENT.md b/DEV_ENVIRONMENT.md index e24b2e2ac045..2b5024063fe2 100644 --- a/DEV_ENVIRONMENT.md +++ b/DEV_ENVIRONMENT.md @@ -1,5 +1,4 @@ # Developer guide: getting your environment set up - 1. Make sure you have both `node` and `yarn` installed. We recommend using `nvm` to manage your node versions. 2. angular/components uses Bazel which requires certain Bash and UNIX tools. @@ -19,7 +18,6 @@ To bring up a local server, run `yarn dev-app`. This will automatically watch fo and rebuild. The browser should refresh automatically when changes are made. ### Running tests - To run unit tests, run `yarn test `. The `target` can be either a short name (e.g. `yarn test button`) or an explicit path `yarn test src/cdk/stepper`. To run the e2e tests, run `yarn e2e`. To run lint, run `yarn lint`. @@ -67,7 +65,6 @@ at the file under `tools/public_api_guard/.d.ts`. ### Disabling Git hooks - If your development workflow does not intend the commit message validation to run automatically when commits are being created, or if you do not want to run the formatter upon `git commit`, you can disable any installed Git hooks by setting `HUSKY=0` in your shell environment. e.g. @@ -78,4 +75,11 @@ export HUSKY=0 # .bashrc export HUSKY=0 -``` \ No newline at end of file +``` + +### Injecting variables into the dev app +Variables can be injected into the dev app by creating the `src/dev-app/variables.json` file. +They'll be made available under the `window.DEV_APP_VARIABLES` object. The file isn't checked into +Git and it can be used to pass private configuration like API keys. Variables currently being used: + +* `GOOGLE_MAPS_KEY` - Optional key for the Google Maps API. diff --git a/src/dev-app/index.html b/src/dev-app/index.html index 7c4b4f43a484..28a6a610043a 100644 --- a/src/dev-app/index.html +++ b/src/dev-app/index.html @@ -23,12 +23,13 @@