Skip to content

Commit

Permalink
Merge branch 'master' into ian/274-routing
Browse files Browse the repository at this point in the history
  • Loading branch information
macfarlandian committed Dec 18, 2020
2 parents 302d148 + 4b32c00 commit 1305e8e
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 9 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ In addition, there are some Yarn scripts defined in the root package as a conven

`yarn test` - runs the tests for all packages in a single command. (The output this produces is pretty messy at the moment but it can be useful for editor integration)

### Code editor integration

Your code editor may need some additional configuration to properly integrate with this monorepo setup. While not exhaustive, these are some tips we have found useful for ourselves:

#### Visual Studio Code

- install the [ESLint plugin](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint), and in your Workspace settings, set the ESLint Working Directories to an array of all the package directories.
- install the [Jest plugin](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest), and in your Workspace settings, set the "path to Jest" to `yarn test --`

### Other tools

Style and formatting rules for this repository are defined with [ESLint](https://eslint.org/) and [Prettier](https://prettier.io/). The base configuration lives in the root of this repository and is extended by the individual packages as necessary. For this reason, it is important to run the individual `lint` commands for each package rather than trying to lint the entire repository at once with `eslint .` — this will exclude the nested configurations and produce inconsistent results.
Expand Down
11 changes: 10 additions & 1 deletion spotlight-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ We suggest installing a linting package for your preferred code editor that hook

#### Environment variables

Second and last, set up your environment variables. Copy the `.env.example` file and set variables accordingly per environment. The app can be deployed to both staging and production environments. Staging relies on environment variables stored in `.env.development` and production relies on variables in `.env.production`. Local relies on `.env.development.local`. The test environment relies on `.env.test`.
Second and last, set up your environment variables. There are four possible environments this code may run in: local development, test, and two deployment targets (staging and production).

You can copy the `.env.example` file and set variables accordingly per environment. Alternatively, baseline versions of the various files you may need can be found in the Recidiviz shared password manager, if you have access to that. Secrets and live environment configuration values should **never** be checked in here!

The Create React App documentation explains all the possible [env config files](https://create-react-app.dev/docs/adding-custom-environment-variables#what-other-env-files-can-be-used) you may wish to use, and how they relate to one another. At minimum you will need the following:

- `.env.development` - consumed by `yarn build-staging` to prepare a staging environment deployment
- `.env.development.local` - consumed by `yarn dev` for local development.
- `.env.test` - consumed by `yarn test`. For consistency this should mirror any env setup in the CI configuration (see `/.github/workflows`)
- `.env.production` - consumed by `yarn build` to prepare a production environment deployment

Expected environment variables include:

Expand Down
10 changes: 5 additions & 5 deletions spotlight-client/src/contentModels/Tenant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ type InitOptions = {
* `Collection`s and `Metric`s will be instantiated for the `Tenant`.
*/
export default class Tenant {
id: TenantId;
readonly id: TenantId;

name: string;
readonly name: string;

description: string;
readonly description: string;

collections: InitOptions["collections"];
readonly collections: InitOptions["collections"];

metrics: InitOptions["metrics"];
readonly metrics: InitOptions["metrics"];

constructor({ id, name, description, collections, metrics }: InitOptions) {
this.id = id;
Expand Down
13 changes: 10 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4728,6 +4728,13 @@ d3-geo@^2.0.1:
dependencies:
d3-array ">=2.5"

d3-geo@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-2.0.1.tgz#2437fdfed3fe3aba2812bd8f30609cac83a7ee39"
integrity sha512-M6yzGbFRfxzNrVhxDJXzJqSLQ90q1cCyb3EWFZ1LF4eWOBYxFypw7I/NFVBNXKNqxv1bqLathhYvdJ6DC+th3A==
dependencies:
d3-array ">=2.5"

d3-glyphedge@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/d3-glyphedge/-/d3-glyphedge-1.2.0.tgz#295367d8405f83cdbe8319171bb1f6636c60f85b"
Expand Down Expand Up @@ -7385,9 +7392,9 @@ inherits@2.0.3:
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=

ini@^1.3.5, ini@~1.3.0:
version "1.3.5"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
version "1.3.8"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==

inquirer@7.0.4:
version "7.0.4"
Expand Down

0 comments on commit 1305e8e

Please sign in to comment.