Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Jul 5, 2023
1 parent bf5de7f commit 3d7fff8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/usage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import consola from "consola";
import { colors } from 'consola/utils'
import { colors } from "consola/utils";
import { formatLineColumns, resolveValue } from "./_utils";
import type { ArgsDef, CommandDef } from "./types";
import { resolveArgs } from "./args";
Expand Down Expand Up @@ -83,15 +83,19 @@ export async function renderUsage<T extends ArgsDef = ArgsDef>(
const version = cmdMeta.version || parentMeta.version;

usageLines.push(
colors.gray(`${cmdMeta.description} (${commandName + (version ? ` v${version}` : "")})`),
colors.gray(
`${cmdMeta.description} (${
commandName + (version ? ` v${version}` : "")
})`,
),
"",
);

const hasOptions = argLines.length > 0 || posLines.length > 0;
usageLines.push(
`${colors.underline(colors.bold('USAGE'))} \`${commandName}${hasOptions ? " [OPTIONS]" : ""} ${usageLine.join(
" ",
)}\``,
`${colors.underline(colors.bold("USAGE"))} \`${commandName}${
hasOptions ? " [OPTIONS]" : ""
} ${usageLine.join(" ")}\``,
"",
);

Expand Down

0 comments on commit 3d7fff8

Please sign in to comment.