mozey / config

Manage env vars with flat key/value files
MIT License
0 stars 1 forks source link

YAML Support #27

Closed mozey closed 2 years ago

mozey commented 2 years ago

"The YAML 1.2 specification was published in 2009. Its primary focus was making YAML a strict superset of JSON." See 1.2.2 spec

YAML files take precedence, e.g.

This feature would be useful for adding comments to config files. Config files must still be flat key value pairs

mozey commented 2 years ago

Also consider this https://stackoverflow.com/a/3104376/639133

Suppose you are using JSON to keep configuration files, which you would like to annotate. Go ahead and insert all the comments you like. Then pipe it through JSMin before handing it to your JSON parser. - Douglas Crockford, 2012

Practically speaking, maybe json5 would be useful, as opposed to e.g. config.dev.js? So the precedence would be

mozey commented 2 years ago

getConfigFilePaths method defines the load precedence

mozey commented 2 years ago

30