Pular para o conteúdo

WranglerCommand

Atualizado em Ver como Markdown

The WranglerCommand component documents the available options for a given command.

This is generated using the Wrangler version in the cloudflare-docs repository.

Import

import { WranglerCommand } from "~/components";

Usage

import { WranglerCommand } from "~/components";

<WranglerCommand
	command="deploy"
	description={"Deploy a [Worker](/workers/)"}
/>

<WranglerCommand command="d1 execute" />

With ExtraFlagDetails

You can add or replace help text for specific flags using the ExtraFlagDetails component:

import { WranglerCommand, ExtraFlagDetails } from "~/components";

<WranglerCommand command="deploy">
	<ExtraFlagDetails key="dry-run">
		Additional details about the dry-run flag that will be appended to the
		original help text. Here is a [link](https://cloudflare.com) for more
		information.
	</ExtraFlagDetails>
	<ExtraFlagDetails key="compatibility-date" mode="replace">
		Custom help text that completely replaces the original description for this
		flag.
	</ExtraFlagDetails>
</WranglerCommand>

Arguments

  • command string required
    • The name of the command, i.e d1 execute.
  • headingLevel boolean (default: 2) optional
    • The heading level that the command name should be added at on the page, i.e 2 for a h2.
  • description string optional
    • A description to render below the command heading. If not set, defaults to the value specified in the Wrangler help API.