Skip to content

Commit d33b18a

Browse files
committed
add docs link to --help output
1 parent c51cd3a commit d33b18a

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

packages/wrangler/src/core/register-yargs-command.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function createRegisterYargsCommand(
3333
if (def.type === "command") {
3434
const args = def.args ?? {};
3535

36-
yargs.options(args);
36+
yargs.options(args).epilogue(def.metadata?.epilogue ?? "");
3737

3838
// Ensure non-array arguments receive a single value
3939
for (const [key, opt] of Object.entries(args)) {

packages/wrangler/src/core/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export type Metadata = {
2828
deprecatedMessage?: string;
2929
hidden?: boolean;
3030
owner: Teams;
31+
/** Prints something at the bottom of the help */
32+
epilogue?: string;
3133
};
3234

3335
export type ArgDefinition = PositionalOptions &

packages/wrangler/src/type-generation/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export const typesCommand = createCommand({
2121
"📝 Generate types from bindings and module rules in configuration\n",
2222
status: "stable",
2323
owner: "Workers: Authoring and Testing",
24+
epilogue:
25+
"📖 Learn more at https://developers.cloudflare.com/workers/languages/typescript/",
2426
},
2527
positionalArgs: ["path"],
2628
args: {

0 commit comments

Comments
 (0)