runok
Version:
NPM scripts on steroids! Replace your scripts with pure JS
80 lines • 1.46 kB
TypeScript
import { TaskConfig } from "../task";
import { Result } from '../result';
interface gitConfigType {
(cfg: GitConfig): void;
}
/**
* Provides flexible interface to running multiple git commands:
*
* ```js
* await git(cmd => {
* cmd.pull();
* cmd.commit('-m updated');
* cmd.push();
* })
* ```
*
* ### Commands API
*
* * `cmd.init`
* * `cmd.tag`
* * `cmd.branch`
* * `cmd.commit`
* * `cmd.pull`
* * `cmd.push`
* * `cmd.add`
* * `cmd.clone`
* * `cmd.cloneShallow`
*
* @param configFn
*/
export default function git(configFn: gitConfigType): Promise<Result>;
/**
* Git Config Class
*/
export declare class GitConfig extends TaskConfig {
commands: String[];
TASK: string;
/**
* @param tag
*/
tag(tag: any): this;
/**
* Commit params
* @param message
*/
commit(message?: string): this;
/**
* @param branch
*/
pull(branch?: string): this;
push(branch?: string): this;
/**
* Initialize git repository
*/
init(): this;
/**
*
* @param params
*/
add(params?: string): this;
/**
*
* @param url
* @param path
*/
clone(url: any, path: any): this;
/**
*
* @param command
*/
branch(command: any): this;
cloneShallow(url: any, path: any): this;
/**
*
* @param params
*/
checkout(params: any): this;
}
export {};
//# sourceMappingURL=git.d.ts.map