gt8: make the package installable
This commit is contained in:
parent
f3bfe0f905
commit
1f676d6b68
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ node_modules/
|
||||
pnpm-debug.log
|
||||
pnpm-lock.yaml
|
||||
dist
|
||||
git-mikado-*.tgz
|
||||
|
3
bin/git-mikado.js
Executable file
3
bin/git-mikado.js
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
require('../src/git-mikado.js').run();
|
@ -1,8 +1,11 @@
|
||||
{
|
||||
"name": "git-mikado",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"version": "0.1.0",
|
||||
"description": "Tool using the Mikado method for git branch management",
|
||||
"main": "src/index.js",
|
||||
"bin": {
|
||||
"git-mikado": "./bin/git-mikado.js"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
|
10
src/git-mikado.js
Normal file → Executable file
10
src/git-mikado.js
Normal file → Executable file
@ -5,10 +5,12 @@ const status = require("./commands/status");
|
||||
const done = require("./commands/done");
|
||||
const upstream = require("./commands/upstream");
|
||||
|
||||
const { currentBranch } = require("./utils");
|
||||
const utils = require("./utils");
|
||||
|
||||
currentBranch().then((currentBranch) => {
|
||||
yargs
|
||||
module.exports.run = async () => {
|
||||
const currentBranch = await utils.currentBranch();
|
||||
|
||||
return yargs
|
||||
.scriptName("git-mikado")
|
||||
.showHelpOnFail(true)
|
||||
.command("status", "show status of all mikado branches", status)
|
||||
@ -74,4 +76,4 @@ currentBranch().then((currentBranch) => {
|
||||
.help()
|
||||
.demandCommand(1, "")
|
||||
.strict().argv;
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user