Skip to content

非公式 / UnofficialCloudflare, Inc. 非提携。アカウント情報は入力しないでください。Not affiliated with Cloudflare, Inc. Do not enter Cloudflare credentials here.Official docsこのサイトについてプライバシー

WranglerCommand

最終更新 Markdown で表示Agent セットアップ

WranglerCommand コンポーネントは、指定したコマンドで利用できるオプションをドキュメント化します。

これは cloudflare-docs リポジトリ ↗ の Wrangler バージョンを使って生成されます。

インポート

import { WranglerCommand } from "~/components";

使い方

import { WranglerCommand } from "~/components";

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

<WranglerCommand command="d1 execute" />

ExtraFlagDetails を使う

ExtraFlagDetails コンポーネントを使うと、特定フラグのヘルプテキストを追加または置き換えられます。

import { WranglerCommand } from "~/components";
import ExtraFlagDetails from "~/components/cf/ExtraFlagDetails.astro";

<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>

引数

  • command string required
    • コマンドの名前です。例: d1 execute。
  • headingLevel boolean (default: 2) optional
    • ページ上でコマンド名を付ける見出しレベルです。例: h2 なら 2。
  • description string optional
    • コマンド見出しの下に表示する説明です。未設定の場合、Wrangler help API で指定された値がデフォルトになります。

役に立ちましたか?