Closed thombruce closed 3 months ago
Alternatives to toodles.config.ts
:
toodles.config.toml
toodles.toml
toodles.config.yml
toodles.yml
toodles.config.json
toodles.json
File presence should be entirely optional (though we will probably include it by default), so I don't know if that rules out something like the ts
option... Can it be conditionally imported?
Dynamic imports likely possible: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import
See also: https://stackoverflow.com/questions/13444064/typescript-conditional-module-import-export
Related to #73
Also related to 5273a6dd71d2a751119e609e6f7e6808446c27ab which enables the base path to be configured as an environment variable.
I'd like it to be possible to configure options that way, but also to be able to use a file instead, say...
toodles.config.ts
.Somewhere where base, history mode, app name, default language can all be configured, among whatever other options present themselves in future.
Precedent should be, what... ENV variable > config file > default
But at least the presence of a config file provides an intuitive source of truth that's easily adjusted in forked and derivative projects.