diff --git a/.gitignore b/.gitignore index c8e0b16..b9a8c89 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ node_modules/ .settings/ .idea/ test/temp/ +test/temp2/ coverage/ docs/ diff --git a/dist/smartgit.add.d.ts b/dist/smartgit.add.d.ts index 62d7805..79480f5 100644 --- a/dist/smartgit.add.d.ts +++ b/dist/smartgit.add.d.ts @@ -1 +1,5 @@ import "typings-global"; +export declare let pull: (optionsArg: { + path: string; + ref?: string; +}) => void; diff --git a/dist/smartgit.add.js b/dist/smartgit.add.js index 9e8a100..9190c0b 100644 --- a/dist/smartgit.add.js +++ b/dist/smartgit.add.js @@ -1,4 +1,10 @@ "use strict"; require("typings-global"); +var plugins = require("./smartgit.plugins"); +exports.pull = function (optionsArg) { + if (!optionsArg.ref) + optionsArg.ref = "master"; + plugins.nodegit.Repository.open(optionsArg.path); +}; -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0Z2l0LmFkZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFEIiwiZmlsZSI6InNtYXJ0Z2l0LmFkZC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBcInR5cGluZ3MtZ2xvYmFsXCIiXX0= +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0Z2l0LmFkZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQ3hCLElBQVksT0FBTyxXQUFNLG9CQUFvQixDQUFDLENBQUE7QUFFbkMsWUFBSSxHQUFHLFVBQUMsVUFBb0M7SUFDbkQsRUFBRSxDQUFBLENBQUMsQ0FBQyxVQUFVLENBQUMsR0FBRyxDQUFDO1FBQUMsVUFBVSxDQUFDLEdBQUcsR0FBRyxRQUFRLENBQUM7SUFDOUMsT0FBTyxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUNyRCxDQUFDLENBQUEiLCJmaWxlIjoic21hcnRnaXQuYWRkLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFwidHlwaW5ncy1nbG9iYWxcIjtcbmltcG9ydCAqIGFzIHBsdWdpbnMgZnJvbSBcIi4vc21hcnRnaXQucGx1Z2luc1wiO1xuXG5leHBvcnQgbGV0IHB1bGwgPSAob3B0aW9uc0FyZzp7cGF0aDpzdHJpbmcscmVmPzpzdHJpbmd9KSA9PiB7XG4gICAgaWYoIW9wdGlvbnNBcmcucmVmKSBvcHRpb25zQXJnLnJlZiA9IFwibWFzdGVyXCI7XG4gICAgcGx1Z2lucy5ub2RlZ2l0LlJlcG9zaXRvcnkub3BlbihvcHRpb25zQXJnLnBhdGgpO1xufVxuIl19 diff --git a/package.json b/package.json index 9f7b89e..0467e1f 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.0.10", "description": "an easy wrapper for nodegit", "main": "dist/index.js", + "typings":"dist/index.d.ts", "scripts": { "test": "(npmts)" }, @@ -22,7 +23,7 @@ }, "homepage": "https://github.com/pushrocks/smartgit", "dependencies": { - "beautylog": "^5.0.10", + "beautylog": "^5.0.12", "nodegit": "^0.13.2", "q": "^1.4.1", "typings-global": "^1.0.3" diff --git a/test/temp2 b/test/temp2 deleted file mode 160000 index 2313d2e..0000000 --- a/test/temp2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2313d2e4d5791cdc4d175425e3eb88c876ceb8bf