Stackedit/js/github-provider.js

23 lines
599 B
JavaScript
Raw Normal View History

2013-04-14 13:24:29 +00:00
define(["jquery", "github-helper"], function($, githubHelper) {
// Dependencies
var core = undefined;
var publishGithub = {
providerType: PROVIDER_TYPE_PUBLISH_FLAG,
providerId: PROVIDER_GITHUB,
providerName: "GitHub"
};
2013-04-14 21:15:40 +00:00
publishGithub.publish = function(publishAttributes, title, content, callback) {
2013-04-14 13:24:29 +00:00
var commitMsg = core.settings.commitMsg;
2013-04-14 21:15:40 +00:00
githubHelper.upload(publishAttributes.repository, publishAttributes.branch,
publishAttributes.path, content, commitMsg, callback);
2013-04-14 13:24:29 +00:00
};
publishGithub.init = function(coreModule) {
core = coreModule;
};
return publishGithub;
});