smartgit/ts/smartgit.init.ts

14 lines
488 B
TypeScript
Raw Normal View History

2016-06-12 14:46:59 +00:00
import "typings-global"
2016-03-30 23:59:45 +00:00
import plugins = require("./smartgit.plugins");
export = function(){
var gitinit = function(dest:string = "undefined") {
if (dest == "undefined") { //lets check if a destination is defined...
return; // ...and return function here if not
}
var isBare = 0; //lets create a subfolder
plugins.nodegit.Repository.init(dest, isBare).then(function (repo) {
// do something with repo here.
});
};
}