0.3.1 • Published 8 years ago

update-contributors v0.3.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

update-contributors NPM version Build Status

Update contributors property in package.json with current github contributors.

CLI

$ npm install -g update-contributors

After 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-contrib

Update

When installed globally, update-contributors will work with update and run automatically.

$ update

Usage

Install with npm

$ npm i update-contributors --save
var 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 to false the contributors will be objects in the contributors array. Defaults to true.
  • cb {Function}: Callback function that will get an err when an error happens or a results with 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

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

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.