-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add examples, temporarily use git fork of cliui
Waiting on yargs/cliui#139 Re: yargs/cliui#138
- Loading branch information
1 parent
189c00a
commit baa6f3b
Showing
7 changed files
with
815 additions
and
612 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/* | ||
/.* | ||
|
||
!/examples | ||
!typedoc.json | ||
!tsconfig*.json | ||
!.github | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
import('../dist/mjs/index.js').then(({ jack }) => { | ||
const j = jack({ | ||
usage: ` | ||
git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] [-e] | ||
<tagname> [<commit> | <object>] | ||
or: git tag -d <tagname>... | ||
or: git tag [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>] | ||
[--points-at <object>] [--column[=<options>] | --no-column] | ||
[--create-reflog] [--sort=<key>] [--format=<format>] | ||
[--merged <commit>] [--no-merged <commit>] [<pattern>...] | ||
or: git tag -v [--format=<format>] <tagname>... | ||
`, | ||
}) | ||
.flag({ | ||
list: { | ||
short: 'l', | ||
description: 'list tag names', | ||
}, | ||
}) | ||
.opt({ | ||
n: { | ||
hint: 'n', | ||
description: 'print <n> lines of each tag message', | ||
}, | ||
}) | ||
.flag({ | ||
delete: { | ||
short: 'd', | ||
description: 'delete tags', | ||
}, | ||
}) | ||
.flag({ | ||
verify: { | ||
short: 'v', | ||
description: 'verify tags', | ||
negate: { hidden: true }, | ||
}, | ||
}) | ||
.flag({ | ||
help: { | ||
short: 'h', | ||
}, | ||
}) | ||
.description('Tag creation options') | ||
.flag({ | ||
annotate: { | ||
short: 'a', | ||
description: 'annotated tag, needs a message', | ||
}, | ||
}) | ||
.opt({ | ||
message: { | ||
short: 'm', | ||
hint: 'message', | ||
description: 'tag message', | ||
}, | ||
file: { | ||
short: 'F', | ||
hint: 'file', | ||
description: 'read message from file', | ||
}, | ||
}) | ||
.flag({ | ||
sign: { | ||
short: 's', | ||
description: 'annotated and GPG-signed tag', | ||
}, | ||
}) | ||
.opt({ | ||
cleanup: { | ||
hint: 'mode', | ||
description: 'how to strip spaces and #comments from message', | ||
}, | ||
'local-user': { | ||
short: 'u', | ||
hint: 'key-id', | ||
description: 'use another key to sign the tag', | ||
}, | ||
}) | ||
.flag({ | ||
force: { | ||
short: 'f', | ||
description: 'replace the tag if exists', | ||
}, | ||
}) | ||
.description('Tag listing options') | ||
.opt({ | ||
column: { | ||
hint: 'style', | ||
description: 'show tag list in columns', | ||
}, | ||
sort: { | ||
hint: 'type', | ||
description: 'sort tags', | ||
}, | ||
contains: { | ||
hint: 'commit', | ||
description: 'print only tags that contain the commit', | ||
}, | ||
'points-at': { | ||
hint: 'object', | ||
description: 'print only tags of the object', | ||
}, | ||
}) | ||
const { values, positionals } = j.parse() | ||
if (values.help) console.log(j.usage()) | ||
else console.log({ values, positionals }) | ||
}) |
Oops, something went wrong.