update-contributors v0.3.1
update-contributors

Update contributors property in package.json with current github contributors.
CLI
$ npm install -g update-contributorsAfter globably installing, run update-contrib at the commandline from a repository.
This will add any contributors found on github to the contributors array inside package.json.
Warning the repository property needs to be in the package.json following one of the github formats found in the npm docs
$ update-contribUpdate
When installed globally, update-contributors will work with update and run automatically.
$ updateUsage
Install with npm
$ npm i update-contributors --savevar update = require('update-contributors');API
update
Pulldown github contributors and update the contributors property in the provided package.json object.
Params
pkg{Object}: Object representing the package.json to update.options{Object}: Options to use for github authentication.options.creds{Object}: Github credentials. May be a token or a username and password. If execuled ask-for-github-auth will be used.options.stringify{Boolean}: When set tofalsethe contributors will be objects in thecontributorsarray. Defaults totrue.cb{Function}: Callback function that will get anerrwhen an error happens or aresultswith the updated package.json object.
Example
var pkg = require('./package.json');
update(pkg, function (err, results) {
if (err) return console.error(err);
console.log(reults);
//=> updated package.json object
});Related projects
- github-base: Base methods for creating node.js apps that work with the GitHub API. | homepage
- github-contributors: Generate a markdown or JSON list of contributors for a project using the GitHub API. | homepage
- stringify-author: Stringify an authors object to
name <email> (url). | homepage
Running tests
Install dev dependencies:
$ npm i -d && npm testContributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Author
Brian Woodward
License
Copyright © 2015 Brian Woodward Released under the MIT license.
This file was generated by verb-cli on November 17, 2015.