Cognizant-CDE-Australia / generator-confit

Build-tool generator for current and future web.
https://odecee.github.io/generator-confit
Other
29 stars 3 forks source link

Make Confit use YAML by default to support comments #67

Closed motevallian closed 8 years ago

motevallian commented 8 years ago

Confit is great and I am using it in another project again. However, one of the things that has been bugging me for a while is that the app configurations we provide to confit are in json format. JSON in my experience is not a comprehensive format for configs due to its limitations. For example, I really need to comment in the configs for future references. It would be great if this config file was a proper nodejs module (such as karma.conf.js) so that I could write JS in it. It would also prevent a lot of redundancy in the configs, e.g. using variables for labeling folders which appear in many places.

uglow commented 8 years ago

@motevallian, I would rather (and was planning to) use YAML for the confit file, which will allow comments.

Regarding writing JS code inside the file, can you talk more about what you are trying to do and why? The idea with the config file is that it would be the source-of-truth for paths, but it sounds like you want to introduce another source-of-truth and keep the Confit file in-sync by using variables.

motevallian commented 8 years ago

It is not a big deal, but still there are a few spots in confit.json where I have to repeat some folder names. With JavaScript config I would be able to define variables an reuse them throughout the application.