Skip to content

Commit

Permalink
🐛 Overwritten information
Browse files Browse the repository at this point in the history
  • Loading branch information
takuma-ru committed Dec 3, 2024
1 parent 24242a3 commit b3dadb4
Show file tree
Hide file tree
Showing 4 changed files with 5,070 additions and 313 deletions.
61 changes: 4 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@

> [!NOTE]
> This is a fork of [@takuma-ru/auto-story-generator](https://github.com/takuma-ru/auto-story-generator/assets/49429291/dca65c2c-3384-45c0-a761-e85276cb2393)(which doesn't support Angular). This is meant to extend @takuma-ru/auto-story-generator and support Angular.
# auto-angular-story-generator
# @takuma-ru/auto-story-generator

![asg-thumbnail](https://auto-story-generator.takumaru.dev/asg-thumbnail-radius.png)

Expand All @@ -12,7 +8,7 @@ Automatic real-time story file generation from React, Vue, Angular and Lit compo
## Getting Started
### 1. Install the package
```bash
npm i auto-angular-story-generator
npm i @takuma-ru/auto-story-generator
```

### 2. Add config
Expand Down Expand Up @@ -41,55 +37,6 @@ const config: StorybookConfig = {
export default config;
```

> [!WARNING]
> Don't run this plugin(Angular part) on your apps right away. Test it on a sample Application or create a new Angular app.
> [!NOTE]
> Angular feature is a WIP. Only a basic story can be created at this point of time. Modify the created stories as required. Will try to improve story creation.
For `Angular` [Webpack custom config](https://storybook.js.org/docs/builders/webpack#working-with-webpack-plugins)

```ts
import type { StorybookConfig } from "@storybook/angular";

import autoStoryGenerator from "@takuma-ru/auto-story-generator";

const customConfig = {
webpackFinal: async (config) => {
let plugin = autoStoryGenerator.webpack({
preset: "angular",
imports: ["**/src/**/*.component.ts"],
});
config.plugins.push(plugin);
return config;
}
}

const primeConfig: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
],
framework: {
name: "@storybook/angular",
options: {},
},
// spread the object here instead of mergeConfig(avaialable for vite)
...customConfig,
docs: {
autodocs: "tag",
},
};

export default primeConfig;
```
> [!NOTE]
> In Angular, for first time story creation, a run tme error occurs, can ignore it.


## Supported Frameworks
> ✅: Supported<br>
> 🚧: Work in progress<br>
Expand All @@ -101,6 +48,6 @@ export default primeConfig;
| React ||
| Vue | 🚧 |
| Lit ||
| Angular | 🚧 |
| Angular | |
| Svelte | 📝 |
| Custom | 📝 |
| Custom | 📝 |
4 changes: 4 additions & 0 deletions asg.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
"name": "🧪 svelte",
"path": "playgrounds/svelte",
},
{
"name": "🧪 angular",
"path": "playgrounds/angular",
},
],
"settings": {
"prettier.enable": false,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@takuma-ru/auto-story-generator-root",
"version": "0.0.0",
"description": "Extends @takuma-ru/auto-story-generator and supports creation of stories for Angular Componenets too",
"description": "",
"scripts": {
"p:core": "pnpm -C packages/auto-story-generator",
"doc": "pnpm -C docs",
Expand All @@ -13,7 +13,7 @@
"pg:angular": "pnpm -C playgrounds/angular",
"pg:lit": "pnpm -C playgrounds/lit"
},
"author": "gadhikari(https://github.com/GeetaKrishna65/auto-angular-story-generator)",
"author": "takuma-ru <[email protected]> (https://github.com/takuma-ru/)",
"license": "ISC",
"packageManager": "[email protected]",
"engines": {
Expand Down
Loading

0 comments on commit b3dadb4

Please sign in to comment.