Automatic real-time story file generation from React, Vue, Angular and Lit component files
npm i @takuma-ru/auto-story-generator
Add settings to main.ts in Storybook (./storybook/main.ts
)
For React
, Vite
import type { StorybookConfig } from "@storybook/react-vite";
import { mergeConfig } from "vite";
import autoStoryGenerator from "@takuma-ru/auto-story-generator";
const config: StorybookConfig = {
viteFinal: async (config) =>
mergeConfig(config, {
plugins: [
autoStoryGenerator.vite({
preset: "react",
imports: ["src/components/**/*.tsx"],
}),
],
}),
};
export default config;
β : Supported
π§: Work in progress
β: Not supported
π: Not yet implemented
Framework | Supported |
---|---|
React | β |
Vue | π§ |
Lit | β |
Angular | π§ |
Svelte | π |
Custom | π |