new implementation
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
import plugins = require("./smartgit.plugins");
|
||||
|
||||
export {add} from "./smartgit.add";
|
||||
export {clone} from "./smartgit.clone";
|
||||
export {commit} from "./smartgit.commit";
|
||||
export {init} from "./smartgit.init";
|
||||
export {pull} from "./smartgit.pull";
|
||||
export {push} from "./smartgit.push";
|
||||
export {remote} from "./smartgit.remote";
|
||||
|
@ -1,5 +1,15 @@
|
||||
import * as plugins from "./smartgit.plugins";
|
||||
import * as helpers from "./smartgit.helpers";
|
||||
|
||||
export let pull = (optionsArg:{path:string,ref?:string}) => {
|
||||
|
||||
}
|
||||
export let add = (dirPathArg:string) => {
|
||||
let done = plugins.Q.defer();
|
||||
if(!helpers.isGitDirectory(dirPathArg)){
|
||||
plugins.beautylog.error("smartgit.add expects a valif git directory!");
|
||||
done.reject();
|
||||
return done.promise;
|
||||
};
|
||||
// if everything is ok proceed
|
||||
plugins.shelljs.exec("");
|
||||
done.resolve(dirPathArg);
|
||||
return done.promise;
|
||||
};
|
||||
|
@ -3,7 +3,7 @@ import * as helpers from "./smartgit.helpers";
|
||||
|
||||
export let commit = (dirPathArg:string,commitMessage:string) => {
|
||||
let done = plugins.Q.defer();
|
||||
if(!plugins.smartfile.fs.isDirectory(plugins.path.join(dirPathArg,".git"))){
|
||||
if(!helpers.isGitDirectory(dirPathArg)){
|
||||
plugins.beautylog.error("smartgit.commit expects a valid git directory");
|
||||
done.reject();
|
||||
return done.promise;
|
||||
|
@ -1,5 +1,6 @@
|
||||
import * as plugins from "./smartgit.plugins";
|
||||
import * as helpers from "./smartgit.helpers";
|
||||
|
||||
export let pull = (dirPathArg:string,sourceArg:string = "", branchArg:string = "") => {
|
||||
let done = plugins.Q.defer();
|
||||
if(!helpers.isGitDirectory(dirPathArg)){
|
||||
|
@ -0,0 +1,16 @@
|
||||
import * as plugins from "./smartgit.plugins";
|
||||
import * as helpers from "./smartgit.helpers";
|
||||
|
||||
let addRemote = (dirPathArg) => {
|
||||
let done = plugins.Q.defer();
|
||||
|
||||
};
|
||||
|
||||
let removeRemote = () => {
|
||||
|
||||
}
|
||||
|
||||
export let remote = {
|
||||
add: addRemote,
|
||||
remove: removeRemote
|
||||
}
|
Reference in New Issue
Block a user