A simple node module to grab your project contributors from your github repo and add them to your package.json. You'll also be prompted to generate a Markdown version of your contributors list and save it to contributors.md
.
npm
Install from$ npm install contributor -g
or add it as one of your projects package.json
dependencies like this:
Usage
To get a record of your project's contribution info from your github repo, cd
into the directory containing your package.json
and run:
$ contributor
Bingo! Your package.json
will be appended with something like this:
As of v0.1.12, you'll be prompted to optionally Save to contributors.md? (yes/no)
.
contributors.md Preview
It should look all spiffy, but unfortunaly I realized after pushing this that github does not support custom text colors and neato things. lame. I'll fix it someday.
***Screenshot of intended Markdown***
Behind the scenes
Contributor hunts for repository.url in your your package.json
. If it finds a valid repo url, it requests collaborator info from the github api and adds it to your package.json
. Super simple. If your repo is private, you'll be prompted for your Github username/password.
$ contributor
will always make a backup of your original json to .package.json
, so all your secret codes are safe.
Pro tip: Add a git push alias and kill a couple birds.
$ git config alias.pushc \!git push $1 $2 && contributor
This will simply add the pushc alias to your .git/config file like so:
[alias]
pushc = !git push $1 $2 && contributor
Then you can run git pushc origin master
, and voila! Give it a try on your next project and let me know what you think!
--
Examle output
package.json Before $ contributor
:
package.json After $ contributor
: