Skip to content

Commit

Permalink
Add auto-story-generator configuration for React and update package k…
Browse files Browse the repository at this point in the history
…eywords
  • Loading branch information
takuma-ru committed Jan 24, 2024
1 parent 2e5122f commit 8caaf33
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 3 deletions.
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,47 @@
Automatic real-time story file generation from React, Vue, and Lit component files

## Getting Started
1. Install the package
### 1. Install the package
```bash
npm i @takuma-ru/auto-story-generator
```

### 2. Add config
Add settings to main.ts in Storybook (`./storybook/main.ts`)

For `React`, `Vite`
```ts
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 | 📝 |
14 changes: 12 additions & 2 deletions packages/auto-story-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,17 @@
"publish:patch-beta": "pnpm build && pnpm dlx release-it patch --preRelease=beta --ci",
"publish:prerelease": "pnpm build && pnpm dlx release-it prerelease --ci"
},
"keywords": [],
"keywords": [
"storybook",
"generator",
"auto",
"react",
"vue",
"lit",
"storybook-addon",
"storybook-addon-generator",
"storybook-addon-auto-story-generator"
],
"author": "takuma-ru <[email protected]> (https://github.com/takuma-ru/)",
"license": "MIT",
"repository": {
Expand All @@ -50,7 +60,7 @@
"url": "https://github.com/takuma-ru/auto-story-generator/issues",
"email": "[email protected]"
},
"homepage": "",
"homepage": "https://auto-story-generator.takumaru.dev",
"dependencies": {
"consola": "^3.2.3",
"magicast": "^0.3.2",
Expand Down

0 comments on commit 8caaf33

Please sign in to comment.