all-contributors-cli/lib/contributors/index.js
2016-03-03 00:03:03 +01:00

16 lines
465 B
JavaScript

'use strict';
var add = require('./add');
var github = require('./github');
var configFile = require('../configFile');
module.exports = function addContributor(options, username, contributions, cb) {
add(options, username, contributions, github, function(error, contributors) {
if (error) {
return cb(error);
}
configFile.writeContributors(options.config, contributors, function(error) {
return cb(error, contributors);
});
});
};