@stacksjs/stx
Version:
A performant UI Framework. Powered by Bun.
43 lines • 1.52 kB
TypeScript
import { } from './dev-server/index';
import { } from './hot-reload';
import { } from './route-middleware';
import type { SyntaxHighlightTheme } from './types';
// Build and serve a specific stx file
export declare function serveStxFile(filePath: string, options?: DevServerOptions): Promise<boolean>;
// Build and serve multiple files (stx and Markdown)
export declare function serveMultipleStxFiles(filePaths: string[], options?: DevServerOptions): Promise<boolean>;
/**
* Serve a full STX application with file-based routing
*
* Directory structure:
* pages/
* index.stx → /
* about.stx → /about
* chat/
* index.stx → /chat
* [id].stx → /chat/:id (dynamic route)
* components/ → Shared components
* public/ → Static assets
*/
export declare function serveApp(appDir?: string, options?: DevServerOptions): Promise<boolean>;
// NOTE: Crosswind CSS, theme selector, port utils, and native window functions
// have been extracted to dev-server/ modules for better organization
// Define types for dev server options
export declare interface DevServerOptions {
port?: number
watch?: boolean
native?: boolean
stxOptions?: any
markdown?: {
syntaxHighlighting?: {
serverSide?: boolean
enabled?: boolean
defaultTheme?: SyntaxHighlightTheme
highlightUnknownLanguages?: boolean
additionalThemes?: SyntaxHighlightTheme[]
}
}
cache?: boolean
hotReload?: boolean
hmrPort?: number
}