Skip to content

Commit

Permalink
AP-85 Add documentation for storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
vin0401 committed Jan 24, 2024
1 parent 5edbfde commit 9d1a457
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const config: StorybookConfig = {
"@storybook/addon-essentials",
"@storybook/addon-onboarding",
"@storybook/addon-interactions",
"@storybook/addon-a11y",
],
framework: {
name: "@storybook/react-webpack5",
Expand All @@ -17,8 +18,19 @@ const config: StorybookConfig = {
},
},
},

docs: {
autodocs: "tag",
},

webpackFinal: async (config) => {
config.resolve!.alias = {
...config.resolve!.alias,
"@Pimcore": path.resolve(__dirname, "../assets/js"),
};

return config;
}
};

export default config;
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@ todo

## Features in a Nutshell

## Storybook

Pimcore studio is using [Storybook](https://storybook.js.org/) for documentation of presentational react components.

### Commands

```
npm run storybook // run storybook with live reloading
npm run build-storybook // for building storybook for a static hosting
```

### Docker environment

To use storybook in your local environment ensure that you open up port `6006`

```
node:
ports:
- "6006:6006"
...
```


## Documentation Overview
- [Installation](./doc/01_Installation.md)
24 changes: 24 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@babel/preset-react": "^7.23.3",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
"@rtk-query/codegen-openapi": "^1.2.0",
"@storybook/addon-a11y": "^7.6.10",
"@storybook/addon-essentials": "^7.6.10",
"@storybook/addon-interactions": "^7.6.10",
"@storybook/addon-links": "^7.6.10",
Expand Down

0 comments on commit 9d1a457

Please sign in to comment.