Getting Started
__CAPGO_KEEP_1__를 복사하여 설치, 동기화 및 이 플러그인의 전체 마크다운 가이드를 포함하는 설정 명령어를 복사하세요.
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.
__CAPGO_KEEP_3__
__CAPGO_KEEP_4__Capgo을 사용하여 플러그인을 설치하는 데 도움을 주는 AI-assisted 설정을 사용할 수 있습니다. 다음 명령어를 사용하여 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.만약에 수동 설정을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래에 플랫폼에 따라 설명된 지침을 따르세요.
bun add @capgo/capacitor-live-reloadbunx cap syncImport
‘Import’라는 제목의 섹션import { LiveReload } from '@capgo/capacitor-live-reload';API 개요
API 개요configureServer
__CAPGO_KEEP_0__ 설정__CAPGO_KEEP_0__ 설정을 저장하여 이후 연결에 사용합니다.
import { LiveReload } from '@capgo/capacitor-live-reload';
await LiveReload.configureServer({} as ConfigureServerOptions);connect
__CAPGO_KEEP_0__ 연결WebSocket 연결을establish합니다. 연결이 이미 활성화되어 있다면.
import { LiveReload } from '@capgo/capacitor-live-reload';
await LiveReload.connect();disconnect
__CAPGO_KEEP_0__ 연결 해제현재 WebSocket 연결을 종료하고 자동 재 연결을 비활성화합니다.
import { LiveReload } from '@capgo/capacitor-live-reload';
await LiveReload.disconnect();getStatus
__CAPGO_KEEP_0__ 상태 확인현재 연결 상태를 반환합니다.
import { LiveReload } from '@capgo/capacitor-live-reload';
await LiveReload.getStatus();Capacitor 웹뷰의 전체 재로드를 트리거합니다.
import { LiveReload } from '@capgo/capacitor-live-reload';
await LiveReload.reload();복사
import { LiveReload } from '@capgo/capacitor-live-reload';
await LiveReload.reloadFile({} as FileUpdatePayload);__CAPGO_KEEP_0__ 웹뷰의 전체 재로드를 트리거합니다.
__CAPGO_KEEP_0__ 웹뷰의 전체 재로드를 트리거합니다.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
__CAPGO_KEEP_0__ 웹뷰의 전체 재로드를 트리거합니다.export interface LiveReloadStatus { connected: boolean; url?: string;}FileUpdatePayload
파일 업데이트 페이로드 섹션export interface FileUpdatePayload { path: string; hash?: string;}LiveReloadEventCallback
라이브 리로드 이벤트 콜백 섹션export type LiveReloadEventCallback = (event: LiveReloadEventPayload) => void;LiveReloadStatusCallback
라이브 리로드 상태 콜백 섹션export type LiveReloadStatusCallback = (status: LiveReloadStatus) => void;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
라이브 리로드 메시지 타입 섹션export type LiveReloadMessageType = 'full-reload' | 'file-update' | 'error' | 'connected' | 'disconnected';실질적인 출처
실제 데이터의 원천이 페이지는 플러그인의 src/definitions.ts. upstream의 API가 변경되었을 때 다시 싱크를 실행하세요.
Getting Started에서 계속
Getting Started에서 계속이러한 기능을 사용 중이라면 Getting Started를 사용하여 대시보드와 API를 계획하고 운영하기 위해 Using @capgo/capacitor-live-reload Using @capgo/capacitor-live-reload API 개요 API 개요 __CAPGO_KEEP_0__ Introduction API Keys API Keys Capgo 구현 세부 사항에 대한 설명 Devices