@kokimoki/kit
v1.8.2
Published
Vite plugin and development tools for building Kokimoki apps.
Readme
@kokimoki/kit
Vite plugin and development tools for building Kokimoki apps.
Installation
npm install @kokimoki/kitQuick Start
Add the plugin to your vite.config.ts:
import { defineConfig } from "vite";
import { kokimokiKitPlugin } from "@kokimoki/kit";
import { z } from "@kokimoki/app";
export default defineConfig({
plugins: [
kokimokiKitPlugin({
conceptId: "your-concept-id",
deployCodes: [
{
name: "default",
description: "Default configuration",
clientContext: {},
},
],
schema: z.object({
title: z.string(),
maxPlayers: z.number(),
}),
stores: [
{ pattern: "game", schema: z.object({ status: z.string() }) },
{
pattern: "player-*",
schema: z.object({ name: z.string() }),
local: true,
},
],
i18nPath: "./src/i18n",
i18nPrimaryLng: "en",
devView: [
[{ label: "host", clientContext: { mode: "host" } }],
[
{ label: "player1", clientContext: { mode: "player" } },
{ label: "player2", clientContext: { mode: "player" } },
],
],
}),
],
});Features
- Vite Plugin - Integrates Kokimoki into your Vite build
- Dev Frame - Multi-window development view for testing different player modes
- Schema Validation - Zod-based validation for stores and project config
- i18n Sync - Automatic synchronization of translations during development
- Style Preprocessing - Theme color processing for CSS variables
Documentation
See the docs folder for detailed instructions:
| File | Description | | ------------------------------------------------------------------- | ------------------------------ | | kokimoki-kit.instructions.md | Plugin configuration and usage |
Related Packages
- @kokimoki/app - Core SDK for runtime (stores, transactions, AI, etc.)
- @kokimoki/cli - CLI for project creation and deployment
