Re:Node.js: Be a good dev: offer dependencies
by nailer on Monday September 05, 2016 @03:22AM
(#12428670)
Use js files for config. They support comments, syntax highlighting will work out of the box, and you can require them.
Re:Node.js: Be a good dev: offer dependencies
by leichtgewicht on Monday September 05, 2016 @03:55AM
(#12428778)
A problem that I have with my article is that readers seem to get hung up on the config loading bits when I tried to use it as an example for a more-general problem.
To fix this I added a section to the article: https://t.co/sXJhTYXQvy
(Using executable files for configuration can be an enormous problem for some uses.)
If it were a handful of extra kb, I'd agree. Of the top off my head I can think of following file formats "somehow" suited for configuration: json, cson, properties files (java), yaml, xml, conf-files (Apache), ignorefile syntax, ini files.
Supporting all of them could be a reasonable goal to the community (looking at the packages in npm: it is an actual goal already).
https://en.wikipedia.org/wiki/Configuration_file