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

16 lines
467 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);
});
});
};