Skip to content

Commit

Permalink
feat: add terminal-link
Browse files Browse the repository at this point in the history
  • Loading branch information
Wxh16144 committed Sep 10, 2023
1 parent a3b7227 commit cb632b0
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
},
"dependencies": {
"kleur": "^4.1.5",
"mri": "^1.2.0"
"mri": "^1.2.0",
"terminal-link": "^3.0.0"
},
"devDependencies": {
"@types/node": "^18.11.19",
Expand Down
42 changes: 42 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { fileURLToPath } from 'url';
import path from "path";
import c from "kleur";
import mri from "mri";
import terminalLink from 'terminal-link';
import { Argv } from "./type";

const __dirname = path.dirname(fileURLToPath(import.meta.url));
Expand All @@ -28,6 +29,7 @@ async function main(args: Argv = argv) {
----------------------------------------
-${c.bold('h')}, --help: show help.
-${c.bold('v')}, --version: show version. ${c.green('v' + pkg.version)}
see more: ${c.gray(terminalLink(pkg.homepage, pkg.homepage))}
----------------------------------------
${c.bold('e.g.')} ${c.green(`${command} -h`)}
`)
Expand Down

0 comments on commit cb632b0

Please sign in to comment.