UNPKG

jj-cli

Version:
1 lines 1.64 kB
"use strict";const e=require("commander"),{gpushAction:o,gpullAction:t,gtagAction:i,gClearAction:r}=require("./actionGit"),n=(n,s,a)=>{const c=e.opts()||{};e.command("gpush <message> [branch] [-d|--depository]").description('message is required. branch: if not branch, default is current. If not set depository, will by using "git remove -v" the first one found ').action(((e,t)=>{o(e||c.message,t||c.branch,c.depository)})),e.command("push <message> [branch] [-d|--depository]").description('message is required. branch: if not branch, default is current. If not set depository, will by using "git remove -v" the first one found ').action(((e,t)=>{o(e||c.message,t||c.branch,c.depository)})),e.command("gpull [-b|--branch] [-d|--depository]").description("pull your code before please keep the code clean").action((()=>{t(c.branch||null,c.depository||null)})),e.command("pull [-b|--branch] [-d|--depository]").description("pull your code before please keep the code clean").action((()=>{t(c.branch||null,c.depository||null)})),e.command("gtag [tagName] [-d|--depository]").description('push your tag, If not set "tagName", will: "${currentBranch}-timestamp"; If not set depository, will by using "git remove -v" the first one found ').action((e=>{i(e,c.depository)})),e.command("tag [tagName] [-d|--depository]").description('push your tag, If not set "tagName", will: "${currentBranch}-timestamp"; If not set depository, will by using "git remove -v" the first one found ').action((e=>{i(e,c.depository)})),e.command("git [clear] [-d|--depository]").description("clear your git cache").action((e=>{r(e,c.depository)}))};module.exports=n;