Skip to content

Commit

Permalink
docs: improve env var notes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Nov 26, 2024
1 parent ce38373 commit 6244248
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ it directly.

### Adding a new environment configuration variable

Any new environment configuration variable must be registered in several places:
Any new environment / configuration variable must be registered in several places:

* [`./create_config_prod.js`](./create_config_prod.js): mapping the environment variable to a config object entry for
production
* [`./webpack.config.js`](./webpack.config.js): setting a default value for Webpack building
* [`./src/public/config.js`](./src/public/config.js): creating the shape of the global config object
* [`./src/js/config.ts`](./src/js/config.ts): loading from the global config object (production) or from the environment
via Webpack (development)
1. [`./create_config_prod.js`](./create_config_prod.js): mapping the environment variable to a config object entry for
production.
2. [`./webpack.config.js`](./webpack.config.js): setting a default value for the environment variable; used in Webpack development
builds.
3. [`./src/public/config.js`](./src/public/config.js): creating the shape of the global config object (using the config object entry key,
mapped to in 1.)
4. [`./src/js/config.ts`](./src/js/config.ts): loading from the global config object (production) via key or from the
environment variable directly, through Webpack replacement (development).

### Translations in dev mode
Add your English to French translations in `dist/public/locales/fr/translation_fr.json` for them to appear on the
Expand Down

0 comments on commit 6244248

Please sign in to comment.