Live Reload __CAPGO_KEEP_0__ リポジトリ
インストールステップとこのプラグインの全てのマークダウンガイドを含むセットアッププロンプトをコピーしてください。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-live-reload`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/live-reload/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
インストール
「インストール」というタイトルのセクションAI-Assisted Setupを使用してプラグインをインストールできます。AIツールにCapgoスキルを追加するには、以下のコマンドを使用してください。
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins次に、以下のプロンプトを使用してください。
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-live-reload` plugin in my project.Manual Setup を好む場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の指示に従ってください。
bun add @capgo/capacitor-live-reloadbunx cap syncImport
「Import」タイトルのセクションimport { LiveReload } from '@capgo/capacitor-live-reload';API オーバービュー
「API オーバービュー」タイトルのセクションconfigureServer
「configureServer」タイトルのセクション接続後の連続使用に使用されるリモート開発サーバー設定を保存します。
import { LiveReload } from '@capgo/capacitor-live-reload';
await LiveReload.configureServer({} as ConfigureServerOptions);connect
接続既存のWebSocket接続が存在しない場合に接続します。
import { LiveReload } from '@capgo/capacitor-live-reload';
await LiveReload.connect();disconnect
切断現在のWebSocket接続を閉じ、自動再接続を無効化します。
import { LiveReload } from '@capgo/capacitor-live-reload';
await LiveReload.disconnect();getStatus
接続状況を取得現在の接続状況を返します。
import { LiveReload } from '@capgo/capacitor-live-reload';
await LiveReload.getStatus();reload
リロードTrigger a full reload of the Capacitor WebView.
import { LiveReload } from '@capgo/capacitor-live-reload';
await LiveReload.reload();reloadFile
セクション「reloadFile」ファイル/モジュールを再読み込みする (サポートされている場合、フルリロードにフォールバックします)。
import { LiveReload } from '@capgo/capacitor-live-reload';
await LiveReload.reloadFile({} as FileUpdatePayload);タイプ リファレンス
セクション「タイプ リファレンス」ConfigureServerOptions
セクション「ConfigureServerOptions」export interface ConfigureServerOptions { /** * Base URL for the dev server (e.g. https://dev.local:5173). * When a connection is established the Capacitor WebView navigates to this URL. */ url: string; /** Optional WebSocket path override when different from /ws. */ websocketPath?: string; /** Extra headers sent when creating the WebSocket connection. */ headers?: Record<string, string>; /** Automatically reconnect when the socket closes unexpectedly. Default: true. */ autoReconnect?: boolean; /** Delay (ms) between reconnection attempts. Default: 2000. */ reconnectInterval?: number;}LiveReloadStatus
セクション「LiveReloadStatus」export interface LiveReloadStatus { connected: boolean; url?: string;}FileUpdatePayload
セクション「FileUpdatePayload」export interface FileUpdatePayload { path: string; hash?: string;}LiveReloadEventCallback
セクション「LiveReloadEventCallback」export type LiveReloadEventCallback = (event: LiveReloadEventPayload) => void;LiveReloadStatusCallback
「LiveReloadStatusCallback」セクションexport type LiveReloadStatusCallback = (status: LiveReloadStatus) => void;LiveReloadEventPayload
「LiveReloadEventPayload」セクションexport interface LiveReloadEventPayload { type: LiveReloadMessageType; /** Populated when type === 'file-update'. */ file?: FileUpdatePayload; /** Optional human-readable message for errors or status changes. */ message?: string;}LiveReloadMessageType
「LiveReloadMessageType」セクションexport type LiveReloadMessageType = 'full-reload' | 'file-update' | 'error' | 'connected' | 'disconnected';真実の源
「真実の源」セクションこのページはプラグインの設定から生成されています。 src/definitions.tsパブリック API がアップストリームで変更された場合に、再度同期を実行してください。
「Getting Started」から続けてください
「Getting Started」から続けてあなたは「を使用しています Getting Started APIとダッシュボードの計画、APIの操作を接続するには capgo/capacitor-live-reloadを使用する 「@capgo/capacitor-live-reload」のネイティブ機能 APIの概要 APIの実装詳細 Introduction 実装詳細 APIのキー for the implementation detail in API Keys, and __CAPGO_KEEP_0__ __CAPGO_KEEP_1__