Re:Node.js: Be a good dev: offer dependencies
by leichtgewicht on Monday September 05, 2016 @02:40AM
(#12428547)
You do have to choose which packages you want to install at some point. When you do `npm install && npm start` it will still work as planned. The problem here address is for when you need to deal with a new issue.
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).
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.)
I would really rather not have to manually install a million packages when pulling down dependencies - "npm install && npm start" and then going to grab a glass of water feels great.
The given use case of a master parsing library doesn't really resonate. A handful of extra kb on disk doesn't bother me at all for an all-in-one solution, and I've never really had the problem of not being able to find a parsing library on npm to begin with.