Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config factory... #74

Closed
cmstead opened this issue Jun 4, 2017 · 2 comments
Closed

Config factory... #74

cmstead opened this issue Jun 4, 2017 · 2 comments

Comments

@cmstead
Copy link

cmstead commented Jun 4, 2017

Hey Jason,

This isn't an issue so much as I just wanted to let you know, I built a tiny little module which allows people to generate a default config without needing to specify anything except a reporter. I got to the point where I was tired of copy/pasting my config all over the place, so I thought I would share.

Thanks again for all your hard work on the Approvals project!

https://github.com/cmstead/approvals-config-factory
https://www.npmjs.com/package/approvals-config-factory

-C

@staxmanade
Copy link
Member

staxmanade commented Jun 11, 2017

Part of me is happy about this, thank you for sharing.

The other part of me is sad that this isn't "easier" or "in-the-box" as you'd like...

I'd like to learn more about you're use-case and possibly why the existing system isn't suitable for you.

I know a project-level config would be a good next-step outline here: #56

Have you tried configuring you're system using the user-level configuration file in ~/.approvalsConfig as outlined here? https://github.com/approvals/Approvals.NodeJS/#configuration

I like to hear more...

@cmstead
Copy link
Author

cmstead commented Jun 11, 2017

I actually need the configuration to be at the project level for a couple reasons. First is, I am not always at the same computer and I need the config to ride with the project. Second, most of my personal projects are open source and I have to ensure the setup for contributors (as infrequent as they are) is as quick as possible.

Honestly, I think your setup is pretty easy, I just find myself copying my configuration pretty often. It's just automating something I probably did to myself. Perhaps I'm overlooking something already in your library config that would simplify my life.

One thing I specifically like about the module I shared is I have the functions typed, so they will expose anything someone might have gotten wrong. I also have a function which will output the type definition of the config object.

You could easily implement this if you wanted. I'm using signet to do my typing. Let me know if you are interested in discussing this more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants