Skip to content

Commit cd8c1d3

Browse files
authored
feat: dotenv (#100)
1 parent 65c503e commit cd8c1d3

File tree

10 files changed

+1283
-1224
lines changed

10 files changed

+1283
-1224
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NODE_ENV=production # String. Default: `production`. Examples: `development`, `test`.
2+
DEBUG= # String. Default: not set. Examples: `*`, `namespace`, `namespace:*`, `value1,value2`

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/.env
12
/.eslintcache
23
/coverage
34
/dist

DEVELOPING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
- [Why are there so many config files?](#why-are-there-so-many-config-files)
1212
- [Why isn't the build bundled or minified?](#why-isnt-the-build-bundled-or-minified)
1313
- [Why does the Babel build script contain the `--source-maps` option?](#why-does-the-babel-build-script-contain-the---source-maps-option)
14-
- [Why does the `format-eslint` script ignore errors?](#why-does-the-format-eslint-command-ignore-errors)
14+
- [Why does the `format-eslint` script ignore errors?](#why-does-the-format-eslint-script-ignore-errors)
15+
- [Why does the `start-src` script use `--require node_modules/dotenv/config`?](#why-does-the-start-src-script-use---require-node_modulesdotenvconfig)
1516

1617
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
1718

@@ -71,3 +72,7 @@ This option is available in the Babel config file (`sourceMaps: true`), but has
7172
Linting errors should not be reported when formatting, that it was the `lint` command is for.
7273

7374
Errors are ignored by appending the following: `>/dev/null 2>&1 || true`.
75+
76+
## Why does the `start-src` script use `--require node_modules/dotenv/config`?
77+
78+
The [recommended setup](https://github.com/motdotla/dotenv#preload) advises preloading with `--require dotenv/config`. However due to a [known problem in Babel](https://github.com/babel/babel/issues/8229), this must be prefixed with `node_modules`.

0 commit comments

Comments
 (0)