[Feature] Add file loading helper functions
Closed this issue · 0 comments
Aderinom commented
One sentence description of the feature you would like to request
Add some small helpers to load config files.
Describe the solution you'd like
const cfg = new ConfigBuilder<...>()
.loadFile("config",opts)
Describe alternatives you've considered
Users can also just use import "./config.json" for example.
However i guess this will be something people might ask for.
Furthermore this would allow us to use e.g. https://www.npmjs.com/package/json5?activeTab=readme
to have a less whiny json parser
Additional context
Once again. I'd like JSON5 to be an optional dependency the user can Opt-in to use.