auto-story-generator

Automatic real-time story file generation from React, Vue, and Lit component files

ISC License

Downloads
4.6K
Stars
33

@takuma-ru/auto-story-generator

Description

Automatic real-time story file generation from React, Vue, Angular and Lit component files

Getting Started

1. Install the package

npm i @takuma-ru/auto-story-generator

2. Add config

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 Frameworks

โœ…: Supported ๐Ÿšง: Work in progress โŒ: Not supported ๐Ÿ“: Not yet implemented

Framework Supported
React โœ…
Vue ๐Ÿšง
Lit โœ…
Angular ๐Ÿšง
Svelte ๐Ÿ“
Custom ๐Ÿ“