Skip to content

Use all-contributors-cli to generate contributors list#32

Closed
jfmengels wants to merge 1 commit into
masterfrom
cli
Closed

Use all-contributors-cli to generate contributors list#32
jfmengels wants to merge 1 commit into
masterfrom
cli

Conversation

@jfmengels

Copy link
Copy Markdown
Contributor

Update README.md and .all-contributorsrc to use all-contributors-cli v2.0.0.
It is currently in beta (npm i -g all-contributors-cli@beta).

  • Contributors are listed in .all-contributorsrc, next to the generation settings.
  • The generator uses the contributor list in .all-contributorsrc to generate the list of contributors (using all-contributors generate)
  • If you want to modify the data of a contributor, do it in the rc file, then run the generator again.
  • If you want to add a contributor, run all-contributors add <githublogin> <contributions>. For example all-contributors add kentcdodds doc,review. The contributor's data will be fetched from GitHub, and the avatar will link to his "blog" if available, otherwise to his github page).
  • The badge count is updated at every generation.
  • The tool uses comment tags, like <!-- ALL-CONTRIBUTORS-LIST:START --><!-- ALL-CONTRIBUTORS-LIST:END --> to find where to inject the contributor list and the badge list.
  • I have added the possibility to define custom templates for most of the generations
  • It's possible to configure the tool to go update multiple files, like README.md and CONTRIBUTORS.md. If for example, there is only the badge in the former and the contributor list in the latter, both will be updated (as long as the appropriate comment tags are present).

Let me know what you think!

Preview of the README here

@chrissimpkins

Copy link
Copy Markdown
Contributor

Looks great @jfmengels! Really like the ability to add new contributors to the .all-contributorsrc JSON on the command line.

@jfmengels

Copy link
Copy Markdown
Contributor Author

Hmm... There are some differences between the GH markdown render and the Atom plugin's.

I see that the table now has kind of a grid, and I think I found out how to repair it. Not that I want this to turn into a cosmetic discussion, but which one do you prefer? Grid or no grid?

Also, the badge is on a different line than the other badge. Will have to make a better content injector I guess (currently the tags have to be on separate lines, and at the beginning of each). I kind of like that implementation simplicity ^^'

Thanks @chrissimpkins, it was @kentcdodds's idea to have them all in a rc file :)

@chrissimpkins

Copy link
Copy Markdown
Contributor

Is it possible to use those contributor list tags in a separate CONTRIBUTORS page or does it need to be in the README?

@jfmengels

Copy link
Copy Markdown
Contributor Author

@chrissimpkins You can do it in any file that you want. There is a filesoption that you can put in the rc file (which defaults to ['README.md']. So if you want to put the list in the CONTRIBUTORS.md file, set files to be either ['README.md'] or ['README.md', 'CONTRIBUTORS.md] and move/put the

<!-- ALL-CONTRIBUTORS-LIST:START -->
<!-- ALL-CONTRIBUTORS-LIST:END -->

in there.

@chrissimpkins

Copy link
Copy Markdown
Contributor

fantastic. this is great!

@jfmengels

Copy link
Copy Markdown
Contributor Author

Also noticed that @fhemberger's name makes the table formatting worse as I put back his whole name. Shall I shorten his name again like he himself offered to, or shall we use 6 columns (already configurable)? It might be simpler to just use logins, as some people will have crazy long names and the formatting will then explode even with like 2 contributors.
(but then again, this might be a discussion for another time/thread)

@kentcdodds

Copy link
Copy Markdown
Member

6 columns please.

Will comment more later. This is fantastic!

@jfmengels

Copy link
Copy Markdown
Contributor Author

6 columns you go! (took just a config change and a regeneration)
Just as a FYI: I've had to edit a few things by hand, as they were different from what I got by simply adding you guys to the project. For example, @Jameskmonger's name on GitHub is different from what he added in the list, and @kentcdodds "blog" is different from what is in his profile (though in this case they get redirected to the same thing).

@kentcdodds

Copy link
Copy Markdown
Member

Really sorry it's taken so long for me to get to this. Looking at it now!

@kentcdodds

Copy link
Copy Markdown
Member

Any way we can get rid of these extra empty cells? I think they look funny...

screen shot 2016-03-07 at 10 37 10 pm

Also, it appears that the names on the top row are bold but not the names on the bottom...

Not a huge fan of comma-first style personally. But that's a nit-pick...

Also, I'd like the ability to have the badges inline (as they are now). Is that possible?

Other than those things, this is great!

@jfmengels

Copy link
Copy Markdown
Contributor Author

@kentcdodds

Any way we can get rid of these extra empty cells? I think they look funny...

Sure, I don't care that much either way. Does anybody else want to bikeshed on this?

it appears that the names on the top row are bold but not the names on the bottom...

I think it's because the top row is considered to be the column title row and is therefore made bold by the markdown renderer. If so, this is good enough of a reason to split the table into 1 table per line and getting rid of those extra empty cells.

Not a huge fan of comma-first style personally. But that's a nit-pick...

I'm not that fond of comma-first either, but I made the rc file like that because I'm hoping it will create less conflicts should two contributors be added in different PRs or should a contributor get new contribution types in different PR. I'm not convinced that this will help much, but if can help a bit, I think it's worth it. What do you think?

Also, I'd like the ability to have the badges inline (as they are now). Is that possible?

I don't see what you mean. This is what I had before
image
and what I have now
image
Care to explain the difference?
(notice that we again don't see emojis the same way :D)

@kentcdodds

Copy link
Copy Markdown
Member

I'm not that fond of comma-first either, ...

I know with .babelrc and .eslintrc you can actually provide invalid JSON and it parses just fine. Meaning you don't have to quote keys and you can have comments and (most noteabily) you can do comma-dangle style which I am much more fond of. Maybe you could look into how they parse those RC files...

I'm talking about these badges :-)

screen shot 2016-03-07 at 11 47 01 pm

@jfmengels

Copy link
Copy Markdown
Contributor Author

Oh, yeah, those badges, obviously ^^
I thought they would like fine because they did so in the Atom markdown preview. I'm not sure how to do that. Yeah that is possible, although a bit more of a pain that I would like to, but I will definitely work on it.

@kentcdodds

Copy link
Copy Markdown
Member

Yeah, it'd just need to be able to have the open comment, badge, and closing comment on the same line and I think it'd work.

@jfmengels

Copy link
Copy Markdown
Contributor Author

As for comma-dangle style, I'm not fond of having to force other tools that would like to read the rc file to parse invalid JSON.

@kentcdodds

Copy link
Copy Markdown
Member

rc files are quite common actually. Babel and ESLint use them. Here's a module you could use to get the config from multiple sources which would actually allow people to configure all-contributors-cli in many different ways: https://github.com/davidtheclark/cosmiconfig 👍

@jakebolam

Copy link
Copy Markdown
Contributor

Closing. AWESOME WORK. In the readme and repos now

@jakebolam jakebolam closed this Jan 16, 2019
@jakebolam
jakebolam deleted the cli branch January 16, 2019 04:45
jakebolam pushed a commit that referenced this pull request Feb 4, 2019
* docs: update README.md

* docs: update .all-contributorsrc
jakebolam added a commit that referenced this pull request Feb 4, 2019
* Initial commit

* Update README.md

* first commit

* docs: add ci badge

* docs: add license

* infra: use nvm locally

* ci: correct deploy key

* docs: all contributors

* docs: badge space

* ci: fix cache key

* docs: contributing

* ci: fix working dir

* ci: website build path

* docs: arrange badges

* docs: all contributors specification

* docs: badge not flat square

* docs: switch to all-contributors org (#1)

* docs: update all-contributors link

* docs: switch org

* docs: chat on slack

* docs: use google analytics

* feat: add branding (#3)

* docs: update all-contributors link

* feat: add branding

* docs: add tbenning as a contributor (#4)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: say hello to @all-contributors bot

* docs: links & grammar

* docs: sync with master repo (drops atom plugin recommendation)

* docs: add Greenkeeper badge 🌴 (#5)

* docs(readme): add Greenkeeper badge

* Update README.md

* docs(overview): added new maintenance category (#6)

This goes hand in hand with
[all-contributors-cli#142](all-contributors/cli#142).

* docs: document bot and cli tools (#8)

* docs: update all-contributors link

* docs: wip

* docs: tweaks

* new homepage

* docs: wip

* docs: first pass

* docs: tweaks

* docs: fix some grammar (#13)

* docs: grammar tweaks

* docs: use github star button

* docs: the problem section for CLI

* docs: cli docs

* docs: wording on motivation

* docs: description wrong

* docs: enable search

* docs: update contributing with search

* chore: added commitizen (#9)

* chore(package): added commitizen

* docs(readme): added the cz badge

* chore(yarn): updated yarn.lock

* chore: removed all-contributors-cli

* feat: add translations (#14)

* translation: first pass

* translation: first pass

* brew

* docs: add translations

* infra: write translations in ci

* infra: drop ci for branches

* valid

* docs: add Jongjineee as a contributor (#18)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add robertlluberes as a contributor (#19)

* docs: update README.md

* docs: update .all-contributorsrc

* docs(emoji-key): added missing `business` and `content` (#20)

* docs(emoji-key): added missing `business` and `content`

I added the missing types and removed the uneeded `npx` call in the `commit` NPM script.

* docs(emoji-key): removed 'N/I' line

* docs: switch to Portuguese, Brazilian

* docs: switch to Portuguese, Brazilian

* docs: enable chinese simplified zh-CN

* docs: enable chinese simplified zh-CN

* docs: add Berkmann18 as a contributor (#21)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add MarsXue as a contributor (#22)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add MatheusRC as a contributor (#25)

* docs: update README.md

* docs: update .all-contributorsrc

* Revert "docs: add MatheusRC as a contributor (#25)" (#26)

This reverts commit b20eae0.

* docs: add MatheusRV as a contributor (#27)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: update README.md

* docs: update .all-contributorsrc

* doc: doc fix (#24)

* docs(emoji-key): added missing `business` and `content`

I added the missing types and removed the uneeded `npx` call in the `commit` NPM script.

* docs: improvements and fixes

Made some bits more comprehensible and fixed some typos

* infra: fix ci

* feat: support translations, drop example files

* docs(cli-usage): use inline code to specify the command "generate" (#28)

* docs: add MarsXue as a contributor (#29)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Berkmann18 as a contributor (#31)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add greenkeeper as a contributor (#32)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add allcontributors as a contributor (#33)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add root pages for languages

* docs: remove greenkeeper (#36)

* docs: add Greenkeeper[bot] as a contributor (#37)

* docs: update README.md

* docs: update .all-contributorsrc

* feat: new homepage (#15)

* Added HTML structure for the Index page.

* added base styles, css variables, and a grid. Modified some of the HTML.

* changed a few css rules

* added normalize, continued styling

* added image files, continued styling, modified some of the copy for how to

* fixed the wavey background css

* started adding media queries fixing styling issues

* More css tweaks and adjustments

* couple more styling tweaks, making it responsive

* fixed some flexbox issues. made it more responsive

* feat: add github badge button

* styled the added the github stars widget to live in the nav and float in mobile

* added the icons and styled them for the quick links

* added logos and some styling, might need a last pass on the styles

* changed some copy on buttons, made links open in new tab

* fixing last responsive details on user logos

* wip

* feat: missing files + open graph data

* fix: switch styles over to main.css

* fix: site name

* fixed the issues that the docs css was creating, should be good to go on mobile responsiveness (#43)

docs :fixing CSS

* feat: add 404 page (#44)

* fixed the issues that the docs css was creating, should be good to go on mobile responsiveness

* created a 404 page

* added in / for 404 page

* docs: fix link in 404 page (#45)

* docs: add maryampaz as a contributor (#46)

* docs: update README.md

* docs: update .all-contributorsrc

* feat: add analytics tracking to root pages, and 404s (#47)

* docs: hawaii banner for conference (#50)

* feat: link to jsconfhi

* infra: add 404 check for CI (#52)

* infra: add 404 check for CI

* ci

* background

* sleep less

* check 404s only after release

* infra: smart sleep

* infra: smart sleep

* formik 404

* docs: locallized badge

* docs: switch badge around

* docs: link to build workflow

* docs: few fixes and tweaks (#54)

* aloha, remove use of h1

* docs: move over docs, style footer

* docs: typo fixes (#53)

* docs(emoji-key): added missing `business` and `content`

I added the missing types and removed the uneeded `npx` call in the `commit` NPM script.

* docs: improvements and fixes

Made some bits more comprehensible and fixed some typos

* docs(repository-maintainers): fixed minor typo

* docs(bot): fixed a typo

Fixed the typo in the _overview_ page to the _usage_ one

* docs: fix readme

* website uses allcontributrs.org

* build

* lock file and checkout
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

Successfully merging this pull request may close these issues.

4 participants