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

Support generating the entire table via JSON config #1

Closed
kentcdodds opened this issue Mar 1, 2016 · 7 comments
Closed

Support generating the entire table via JSON config #1

kentcdodds opened this issue Mar 1, 2016 · 7 comments

Comments

@kentcdodds
Copy link
Collaborator

In the rc file, I'd like to be able to do this:

{
  "projectOwner": "kentcdodds",
  "projectName": "all-contributors",
  "imageSize": 100,
  "owner": "jfmengels",
  "contributors": [
    {
      "name": "Jeroen Engels",
      "url": "https://github.com/jfmengels",
      "contributions": [
        "code",
        "doc",
        "test",
        {"type": "tool", "url": "https://github.com/jfmengels/all-contributors-cli"},
        "review"
      ]
    }
  ]
}

Which would produce:

| [![Jeroen Engels](https://avatars.githubusercontent.com/u/3869412?v=3&s=100)<br /><sub>Jeroen Engels</sub>](https://github.com/jfmengels)<br />[💻](https://github.com/kentcdodds/all-contributors/commits?author=jfmengels) [📖](https://github.com/kentcdodds/all-contributors/commits?author=jfmengels) [⚠️](https://github.com/kentcdodds/all-contributors/commits?author=jfmengels) [🔧](https://www.npmjs.com/package/all-contributors-cli) 👀
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |

Notice that you can either pass a string or an object to the contributions and there are some default urls for each, but the default can be overridden with the object.

What do you think? 💭

@kentcdodds
Copy link
Collaborator Author

The thing I like about this is it would allow us to configure the contributors making it much easier for people to add themselves to the list.

@jfmengels
Copy link
Collaborator

Interesting idea. I can't decide whether this should be in 1 file (as you proposed), or in two: a rc file, and a contributors file. I feel like that would be a lot of files though.

For most Node.js project, you have a package.json file, where you can (already implemented) set the config. If you do that, then having the contributors in a JSON-formatted file makes sense, but not a rc file.

I'm leaning towards a contributors.json file, and an optional (since you can also define it in the package.json) rc file. Any thoughs on that? @kentcdodds

@kentcdodds
Copy link
Collaborator Author

Personally, I'd rather it be an rc file where I can configure everything. But I'm fine with either way you choose 👍

@jfmengels
Copy link
Collaborator

Well let's start with your way to start with and see how it goes 👍

@jfmengels
Copy link
Collaborator

Fixed in f2c8733 and ff7457c.

@jfmengels
Copy link
Collaborator

@kentcdodds By the way, I added you as a contributor with regards to your "discussions and feature requests", but there's no real category for that ôo

@kentcdodds
Copy link
Collaborator Author

Maybe there should be ;-)

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

No branches or pull requests

2 participants