Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 1.04 KB

File metadata and controls

53 lines (36 loc) · 1.04 KB

go-web

Interactive Go component for Lynx documentation sites. Renders live Lynx examples with code browsing, web preview, and QR code for on-device testing.

Usage

import { GoConfigProvider, Go } from '@lynx-js/go-web';

const config = {
  exampleBasePath: '/lynx-examples',
};

<GoConfigProvider config={config}>
  <Go example="hello-world" defaultFile="src/App.tsx" />
</GoConfigProvider>

With rspress

import { GoConfigProvider, Go } from '@lynx-js/go-web';
import { rspressAdapter } from '@lynx-js/go-web/adapters/rspress';

const config = {
  exampleBasePath: '/lynx-examples',
  ...rspressAdapter,
};

<GoConfigProvider config={config}>
  <Go example="hello-world" />
</GoConfigProvider>

Development

pnpm dev

This starts the standalone example app at localhost:3000.

CI

All three checks must pass on every PR:

  • Type Checkpnpm typecheck at the repo root
  • Build Example App — standalone Rsbuild example
  • Build Rspress Example — rspress integration example

License

Apache-2.0