UNPKG

@prismai/prism-ladle

Version:

Enhanced component development environment based on Ladle, with multi-project support

82 lines (60 loc) 1.87 kB
# Prism UI Enhanced component development environment based on [Ladle](https://github.com/tajo/ladle), with multi-project support and custom features for enterprise workflows. ## Features - ✅ **All original Ladle features** - Fast, Vite-powered, Storybook-compatible - 🚀 **Multi-project support** - Manage multiple component libraries - 🎨 **Custom theming** - Prism design system integration - 📊 **Enhanced analytics** - Usage tracking and insights - 🔧 **Enterprise features** - Team collaboration and deployment tools ## Installation ```bash npm install @prismai/prism-ladle # or yarn add @prismai/prism-ladle ``` ## Quick Start ```bash # Start the development server npx prism-ladle serve # Build for production npx prism-ladle build # Preview production build npx prism-ladle preview ``` ## Programmatic API ```javascript import serve from "@prismai/prism-ladle/serve"; import build from "@prismai/prism-ladle/build"; import preview from "@prismai/prism-ladle/preview"; // Start development server await serve({ port: 6006, stories: "src/**/*.stories.{js,jsx,ts,tsx}", }); // Build stories await build({ outDir: "dist/stories", }); // Preview built stories await preview({ port: 8080, }); ``` ## Configuration Create `.ladle/config.mjs` in your project: ```javascript /** @type {import('@prismai/prism-ladle').UserConfig} */ export default { stories: "src/**/*.stories.{js,jsx,ts,tsx,mdx}", addons: { control: { enabled: true }, action: { enabled: true }, source: { enabled: true }, a11y: { enabled: true }, }, }; ``` ## Attribution This package is based on the excellent work by [Vojtech Miksu](https://github.com/tajo) and the Ladle team. The core story parsing and rendering engine is from [Ladle v5.0.3](https://github.com/tajo/ladle). ## License MIT License - Original Ladle is also MIT licensed.