Skip to content

Commit

Permalink
Merge pull request #1 from takuma-ru/feature/type-check
Browse files Browse the repository at this point in the history
🔧 type check 用の設定を追加
  • Loading branch information
takuma-ru authored Jan 24, 2024
2 parents 0c845a4 + 8caaf33 commit b86fcba
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
name: Install pnpm
id: pnpm-install
with:
version: 8.9.2
version: 8.14.1
run_install: false

- name: Get pnpm store directory
Expand Down
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 | 📝 |
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
},
"author": "takuma-ru <[email protected]> (https://github.com/takuma-ru/)",
"license": "MIT",
"packageManager": "[email protected]",
"engines": {
"npm": "use pnpm please!",
"yarn": "use pnpm please!",
"pnpm": ">=8.14.1"
},
"volta": {
"node": "20.11.0",
"pnpm": "8.14.1"
Expand Down
2 changes: 2 additions & 0 deletions packages/auto-story-generator/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/*
node_modules
16 changes: 13 additions & 3 deletions packages/auto-story-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"registry": "https://registry.npmjs.org/"
},
"scripts": {
"build": "tsup",
"build": "tsup --dts",
"build:watch": "tsup --watch",
"lint": "eslint --ext .ts,.js .",
"lint:fix": "eslint --ext .ts,.js . --fix",
Expand All @@ -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
3 changes: 2 additions & 1 deletion packages/auto-story-generator/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"strict": true,
"strictNullChecks": true,
"esModuleInterop": true,
"skipLibCheck": true,
"paths": {
"~/*": ["./*"]
}
Expand All @@ -16,5 +17,5 @@
"esm": true,
"experimentalSpecifierResolution": "node"
},
"exclude": ["dist", "eslint.config.js"]
"exclude": ["dist", "eslint.config.js", "../../node_modules"]
}

0 comments on commit b86fcba

Please sign in to comment.