## Announcement
I have recently decided on splitting this addon into multiple other addons. So, we will be moving to @storybook-extras repo which will contain all the addons. This will make it easier to maintain and also to add new features. I will be working on this in the next few weeks.
This addon will be deprecated in favor of the new addons. And it will be pointing to the new addons for the features. So, you can still use it as it is. But, I will be adding new features to the new addons.
For more information the features and new addons, please refer to the documentation available at the [`@storybook-extras`](https://github.com/sheriffMoose/storybook-extras) repo.
功能
- ⚡️ 零設定安裝。
- 📚 支援最新的 Storybook v7。
- 🅰️ 支援最新的 Angular v15。
- 📔 測試執行器的覆蓋率儀器
- 🧪 Angular 服務的自動注入器
- 🦥 延遲載入文件
- 💬 原始碼顯示
- 🌯 Story 封裝器選擇器工具列
- 💻 主控台日誌面板
- 📃 自動 Markdown & HTML 文件支援
- 👨💻 Swagger/OpenAPI 整合
開始使用
- 安裝擴充功能
yarn add @sheriffmoose/storybook-ngx -D
- 新增擴充功能
// .storybook/main.js
module.exports = {
...
"addons": [
"@sheriffmoose/storybook-ngx",
...
],
...
}
- 請參考以下章節,取得內建功能的說明文件。
Demo/Chromatic
在 chromatic 上尋找已發布的 demo storybook,請按這裡
遷移計畫
這些功能各自有自己的擴充功能,且適用於所有框架。它們的功能與之前相同,但名稱和重構程式碼都已更新。
功能 | 之前 | 新的擴充功能 |
---|---|---|
📔 測試執行器的覆蓋率儀器 | @sheriffMoose/storybook-ngx | @storybook-extras/coverage |
🧪 Angular 服務的自動注入器 | @sheriffMoose/storybook-ngx | @storybook-extras/angular |
🦥 延遲載入文件 | @sheriffMoose/storybook-ngx | @storybook-extras/angular |
💬 原始碼顯示 | @sheriffMoose/storybook-ngx | @storybook-extras/angular |
🌯 Story 封裝器選擇器工具列 | @sheriffMoose/storybook-ngx | @storybook-extras/angular |
📃 自動 Markdown & HTML 文件支援 | @sheriffMoose/storybook-md | @storybook-extras/markdown |
💻 主控台日誌面板 | @sheriffMoose/storybook-ngx 的一部分 | @storybook-extras/console |
👨💻 Swagger/OpenAPI 整合 | @sheriffMoose/storybook-ngx 的一部分 | @storybook-extras/swagger |
鳴謝
- 感謝
JS Devtools
出色的coverage istanbul loader
,我們也正在努力將此儀器整合到@storybook/addon-coverage
中。 - 感謝
@storybook/addon-backgrounds
為封裝器選擇器
功能帶來的啟發。 - 如果沒有官方的
@storybook/angular
框架,這一切都不可能實現。 - 感謝官方
Storybook Addon Kit
背後的團隊,特別是@winkerVSbecks
為這個工具組所付出的努力,這個工具組對於產生這個擴充功能非常有幫助。