File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ import { writeTextFile } from "./utils/fs";
44import { writeStdout } from "./utils/otherApi" ;
55
66export async function runCli ( matches : CliMatches ) {
7+ if ( matches . args . help ?. occurrences > 0 ) {
8+ writeStdout ( cliHelpText ) ;
9+ return ;
10+ }
711 if ( matches . args . output ?. occurrences > 0 ) {
812 const outputPath = matches . args . output ?. value as string ;
913 const outputFormat = outputPath . endsWith ( ".svg" ) || outputPath === "-" ? "svg" : "" ;
@@ -19,3 +23,14 @@ export async function runCli(matches: CliMatches) {
1923 }
2024 }
2125}
26+ const cliHelpText = `
27+ ____ _ __ ______ __
28+ / __ \\_________ (_)__ _____/ \\/ ____/________ _____ / /_
29+ / /_/ / ___/ __ \\ / / _ \\/ ___/ __\\/ __/ ___/ __ \\/ __ \\/ __ \\
30+ / ____/ / / /_/ / / / __/ /__/ /_/ \\/_/ / / / /_/ / /_/ / / / /
31+ /_/ /_/ \\____/_/ /\\___/\\___/\\__\\/____/_/ \\__,_/ .___/_/ /_/
32+ /___/ /_/
33+
34+ https://project-graph.top/zh/features/cli
35+
36+ ` ;
You can’t perform that action at this time.
0 commit comments