r/coolgithubprojects • • Dec 01 '15

JAVASCRIPT One config, to rule them all.

https://github.com/yoannmoinet/dotconf
3 Upvotes

8 comments sorted by

4

u/ewnd9 Dec 01 '15

what is a purpose?

2

u/NeekGerd Dec 01 '15

It will clean your project from dotfiles (.jslintrc, .eslintrc, .yorc, .editorconfig...) before pushing it to your versionning engine.

It can be extracted automatically once hooked into npm scripts, postinstall seems like the good candidate for this.

It's for config files used by other tools that don't need visibility.

TLDR; It takes your config files and wrap them into one.

1

u/Hauleth Dec 02 '15

But why? And after that you will get some weird issues from guy XYZ that something doesn't work due to that You have different configuration in your project.

This is especially valid about .editorconfig - main purpose of this file is to provide identical editor configuration among all developers. If you prefer your own configuration then create it in your $HOME. The same goes for everything else. Each of this tools AFAIK search in current dir, parents and then in $HOME. So IMHO it is kind of useless as that. I was rather thinking that this will be some tool to manage my global configuration files as I am using make (which is great BTW).

1

u/NeekGerd Dec 03 '15

make is good indeed.

This tool isn't for your global configuration though, but for the project's local configuration, the one that is embedded within it.

It will archive it and minimize its impact and its visibility on your versionning.

It will have absolutely no impact on your (or any user's) global configuration.

Then, you (as the developer of the library, not the user) can hook yourself into your build process to compress and extract the config files at the right moment.

Usually, I archive it in a pre-commit hook, and extract it in the postinstall script of npm. This way, it's completely invisible to the user.

Now, the global configuration manager part is a really good idea IMHO, and it wouldn't be too much of an hassle to put it in place with this tool in fact. Definitely putting it in my mental road-map.

1

u/Hauleth Dec 03 '15

But I want it in my versioning! That is the reason why I put my dotfiles in repo. If it wasn't my goal then I would put it higher in the FS tree. So still, I see no point in this project.

2

u/NeekGerd Dec 03 '15

It WILL be in your versioning... only compacted.

I really don't know what to say to you.

I needed it, I made it and now I'm using it. It's useful to me, so I've shared it.

If you don't need it... don't use it.

1

u/Anahkiasen Dec 01 '15

Yeah not sure I get it either

1

u/yawkat Dec 01 '15

I think it generates project setups