mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 22:21:27 +08:00
Merge branch 'master' into fix/babel-config
This commit is contained in:
commit
8899be641b
@ -6,7 +6,7 @@ cache:
|
||||
notifications:
|
||||
email: false
|
||||
node_js:
|
||||
- node
|
||||
- 7
|
||||
before_install: "./scripts/travis/before_install.sh"
|
||||
after_success: "./scripts/travis/after_success.sh"
|
||||
script:
|
||||
|
128
CHANGELOG.md
128
CHANGELOG.md
@ -3,17 +3,18 @@
|
||||
Storybook 3.0 is our first fully community-driven release! Notable changes:
|
||||
|
||||
- Moved from `@kadira` to `@storybooks` org across [github](https://github.com/storybooks/storybook/), [npm](https://www.npmjs.com/package/@storybook/react), [docs](https://storybook.js.org/)
|
||||
- Upgraded to Webpack2! <https://github.com/storybooks/storybook/pull/637>
|
||||
- Switched to monorepo and overhauled package structure. <https://github.com/storybooks/storybook/pull/749> <https://github.com/storybooks/storybook/pull/1031>
|
||||
- Added configuration options to storybooks snapshot testing. <https://github.com/storybooks/storybook/pull/1090>
|
||||
- Added `create-react-native-app` support. <https://github.com/storybooks/storybook/pull/1117>
|
||||
- Added HTTPS support. <https://github.com/storybooks/storybook/pull/735>
|
||||
- Upgraded to Webpack2! [#637](https://github.com/storybooks/storybook/pull/637)
|
||||
- Switched to monorepo and overhauled package structure. [#749](https://github.com/storybooks/storybook/pull/749) [#1031](https://github.com/storybooks/storybook/pull/1031)
|
||||
- Added configuration options to storybooks snapshot testing. [#1090](https://github.com/storybooks/storybook/pull/1090)
|
||||
- Added `create-react-native-app` support. [#1117](https://github.com/storybooks/storybook/pull/1117)
|
||||
- Added HTTPS support. [#735](https://github.com/storybooks/storybook/pull/735)
|
||||
|
||||
2017-May-28
|
||||
2017-May-31
|
||||
|
||||
#### Features
|
||||
|
||||
- Added `create-react-native-app` support [#1117](https://github.com/storybooks/storybook/pull/1117)
|
||||
- Added help text to the react-native preview panel [#1142](https://github.com/storybooks/storybook/pull/1142)
|
||||
- Added create-react-native-app support [#1117](https://github.com/storybooks/storybook/pull/1117)
|
||||
- Fixed knobs-addon performance issues [#1039](https://github.com/storybooks/storybook/pull/1039)
|
||||
- Added `snapshotWithOptions` to configure storyshots rendering options [#1090](https://github.com/storybooks/storybook/pull/1090)
|
||||
- Added custom `test` function for storyshots [#1035](https://github.com/storybooks/storybook/pull/1035)
|
||||
@ -22,6 +23,7 @@ Storybook 3.0 is our first fully community-driven release! Notable changes:
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
- Use strict equality in action logger [#1144](https://github.com/storybooks/storybook/pull/1144)
|
||||
- FIX addon info and addon storyshots incompatibility [#1129](https://github.com/storybooks/storybook/pull/1129)
|
||||
- FIX postcss options missing in default webpack config && UPDATE dependencies [#1087](https://github.com/storybooks/storybook/pull/1087)
|
||||
- Fix CLI had a package version from storybook hardcoded - now queries npm registry [#1079](https://github.com/storybooks/storybook/pull/1079)
|
||||
@ -32,6 +34,7 @@ Storybook 3.0 is our first fully community-driven release! Notable changes:
|
||||
|
||||
#### Documentation
|
||||
|
||||
- Add storybook-addon-intl to addon gallery [#1143](https://github.com/storybooks/storybook/pull/1143)
|
||||
- 3.0.0 release notes && release notes automation [#1047](https://github.com/storybooks/storybook/pull/1047)
|
||||
- 3.0.0 migration assistance : codemod, update installation and usage instructions [#1093](https://github.com/storybooks/storybook/pull/1093)
|
||||
- Add ReactSVGPanZoom to examples list [#1139](https://github.com/storybooks/storybook/pull/1139)
|
||||
@ -42,6 +45,7 @@ Storybook 3.0 is our first fully community-driven release! Notable changes:
|
||||
|
||||
#### Maintenance
|
||||
|
||||
- Add typings for links add-on [#1154](https://github.com/storybooks/storybook/pull/1154)
|
||||
- Add react-dom to the devDependency list for React Native projects [#1102](https://github.com/storybooks/storybook/pull/1102)
|
||||
- Upgrade React Native to webpack 2 config [#1097](https://github.com/storybooks/storybook/pull/1097)
|
||||
- Add unit tests for addon storyshots [#971](https://github.com/storybooks/storybook/pull/971)
|
||||
@ -76,9 +80,10 @@ Storybook 3.0 is our first fully community-driven release! Notable changes:
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
32 PRs
|
||||
33 PRs
|
||||
</summary>
|
||||
|
||||
- Added an upgrade mode to getstorybook [#1146](https://github.com/storybooks/storybook/pull/1146)
|
||||
- Update link to Storyshots addon [#1074](https://github.com/storybooks/storybook/pull/1074)
|
||||
- Added error message for missing or invalid storyName [#747](https://github.com/storybooks/storybook/pull/747)
|
||||
- Opened an Open Collective Account https://opencollective.com/storybook [#1065](https://github.com/storybooks/storybook/pull/1065)
|
||||
@ -114,113 +119,6 @@ Storybook 3.0 is our first fully community-driven release! Notable changes:
|
||||
|
||||
</details>
|
||||
|
||||
# 3.0.0
|
||||
|
||||
2017-May-28
|
||||
|
||||
#### Features
|
||||
|
||||
- Added create-react-native-app support [#231042620](https://github.com/storybooks/storybook/pull/231042620)
|
||||
- Fixed knobs-addon performance issues [#229059492](https://github.com/storybooks/storybook/pull/229059492)
|
||||
- Added `snapshotWithOptions` to configure storyshots rendering options [#230288359](https://github.com/storybooks/storybook/pull/230288359)
|
||||
- Added custom `test` function for storyshots [#228610901](https://github.com/storybooks/storybook/pull/228610901)
|
||||
- Added typescript definition to addon notes [#225951611](https://github.com/storybooks/storybook/pull/225951611)
|
||||
- Added HTTPS option for dev server [#218358860](https://github.com/storybooks/storybook/pull/218358860)
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
- FIX addon info and addon storyshots incompatibility [#231375861](https://github.com/storybooks/storybook/pull/231375861)
|
||||
- FIX postcss options missing in default webpack config && UPDATE dependencies [#230235969](https://github.com/storybooks/storybook/pull/230235969)
|
||||
- Fix CLI had a package version from storybook hardcoded - now queries npm registry [#230162081](https://github.com/storybooks/storybook/pull/230162081)
|
||||
- Fix semi broken __docgenInfo integration in addon info [#228501269](https://github.com/storybooks/storybook/pull/228501269)
|
||||
- Fix: build-storybook no longer supports relative paths [#229662130](https://github.com/storybooks/storybook/pull/229662130)
|
||||
- Fix for types `number` for addon knobs [#226931856](https://github.com/storybooks/storybook/pull/226931856)
|
||||
- Fix webpack overriding && Add an example with local file dependencies [#224884216](https://github.com/storybooks/storybook/pull/224884216)
|
||||
|
||||
#### Documentation
|
||||
|
||||
- 3.0.0 release notes && release notes automation [#229400945](https://github.com/storybooks/storybook/pull/229400945)
|
||||
- 3.0.0 migration assistance : codemod, update installation and usage instructions [#230404473](https://github.com/storybooks/storybook/pull/230404473)
|
||||
- Add ReactSVGPanZoom to examples list [#231785266](https://github.com/storybooks/storybook/pull/231785266)
|
||||
- Show webpack 2 config example in docs: rules not loaders [#231777090](https://github.com/storybooks/storybook/pull/231777090)
|
||||
- Merge docs repo into this repo: add /docs [#231485302](https://github.com/storybooks/storybook/pull/231485302)
|
||||
- Change brand name from “React Storybook” to “Storybook” [#229256692](https://github.com/storybooks/storybook/pull/229256692)
|
||||
- Updated issue triage guidelines [#228248588](https://github.com/storybooks/storybook/pull/228248588)
|
||||
|
||||
#### Maintenance
|
||||
|
||||
- Add react-dom to the devDependency list for React Native projects [#230627256](https://github.com/storybooks/storybook/pull/230627256)
|
||||
- Upgrade React Native to webpack 2 config [#230519132](https://github.com/storybooks/storybook/pull/230519132)
|
||||
- Add unit tests for addon storyshots [#225044914](https://github.com/storybooks/storybook/pull/225044914)
|
||||
- Deprecate builtin addons (links and actions) - no longer included by default [#228894668](https://github.com/storybooks/storybook/pull/228894668)
|
||||
- change NPM organisation from kadira to storybook in code [#226755414](https://github.com/storybooks/storybook/pull/226755414)
|
||||
- CHANGE folder structure && CHANGE package-names [#228527160](https://github.com/storybooks/storybook/pull/228527160)
|
||||
- Add deprecation warnings when addons are required via main package [#228301687](https://github.com/storybooks/storybook/pull/228301687)
|
||||
- Remove text transform uppercase for knob labels [#226097455](https://github.com/storybooks/storybook/pull/226097455)
|
||||
|
||||
#### Dependency Upgrades
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
11 PRs
|
||||
</summary>
|
||||
|
||||
- Update lerna to the latest version 🚀 [#230563326](https://github.com/storybooks/storybook/pull/230563326)
|
||||
- CHANGE to prop-types package for notes & test-cra [#230216864](https://github.com/storybooks/storybook/pull/230216864)
|
||||
- update dependencies in cra-storybook [#230162309](https://github.com/storybooks/storybook/pull/230162309)
|
||||
- Switch back to non-fork of react-inspector [#228406523](https://github.com/storybooks/storybook/pull/228406523)
|
||||
- Dependency updates: webpack, babel, react [#227506568](https://github.com/storybooks/storybook/pull/227506568)
|
||||
- Update jest to the latest version 🚀 [#226769419](https://github.com/storybooks/storybook/pull/226769419)
|
||||
- Update lerna to the latest version 🚀 [#224944384](https://github.com/storybooks/storybook/pull/224944384)
|
||||
- CHANGE to use react-split-view 0.1.63 over the fork [#223722248](https://github.com/storybooks/storybook/pull/223722248)
|
||||
- Update lerna to the latest version 🚀 [#222490861](https://github.com/storybooks/storybook/pull/222490861)
|
||||
- Use jest for unittesting - standardize unit testing epic [#222017285](https://github.com/storybooks/storybook/pull/222017285)
|
||||
- Update dependencies to enable Greenkeeper 🌴 [#221621540](https://github.com/storybooks/storybook/pull/221621540)
|
||||
|
||||
</details>
|
||||
|
||||
#### Other
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
32 PRs
|
||||
</summary>
|
||||
|
||||
- Update link to Storyshots addon [#230051949](https://github.com/storybooks/storybook/pull/230051949)
|
||||
- Added error message for missing or invalid storyName [#219411352](https://github.com/storybooks/storybook/pull/219411352)
|
||||
- Opened an Open Collective Account https://opencollective.com/storybook [#229793032](https://github.com/storybooks/storybook/pull/229793032)
|
||||
- Add propTablesExclude option [#223053163](https://github.com/storybooks/storybook/pull/223053163)
|
||||
- addon-info: make the info overlay be fixed [#222360406](https://github.com/storybooks/storybook/pull/222360406)
|
||||
- Handle null elements in getData [#223366686](https://github.com/storybooks/storybook/pull/223366686)
|
||||
- add description field from __docgenInfo for prop table for info plugin [#223519878](https://github.com/storybooks/storybook/pull/223519878)
|
||||
- #959 add a max-height and center element with alignItems: center [#224562424](https://github.com/storybooks/storybook/pull/224562424)
|
||||
- Switch to the only prepublish script [#222005495](https://github.com/storybooks/storybook/pull/222005495)
|
||||
- PR review policy [#222941123](https://github.com/storybooks/storybook/pull/222941123)
|
||||
- Add typescript definitions for getStorybook() [#220545221](https://github.com/storybooks/storybook/pull/220545221)
|
||||
- Restore deep link for addon docs [#222762694](https://github.com/storybooks/storybook/pull/222762694)
|
||||
- Fix default storybook webpack config [#222888979](https://github.com/storybooks/storybook/pull/222888979)
|
||||
- Render the first story for a kind if no story selected. [#222727598](https://github.com/storybooks/storybook/pull/222727598)
|
||||
- Update docs for monorepo [#222225048](https://github.com/storybooks/storybook/pull/222225048)
|
||||
- Monorepo readme and contributing [#222021738](https://github.com/storybooks/storybook/pull/222021738)
|
||||
- Add story kind regex [#222021591](https://github.com/storybooks/storybook/pull/222021591)
|
||||
- Add examples [#221967561](https://github.com/storybooks/storybook/pull/221967561)
|
||||
- Add missing repos [#221960877](https://github.com/storybooks/storybook/pull/221960877)
|
||||
- Switch to monorepo [#219550577](https://github.com/storybooks/storybook/pull/219550577)
|
||||
- extend devMiddlewareOptions with config.devServer [#213843252](https://github.com/storybooks/storybook/pull/213843252)
|
||||
- Added meta IE=edge [#212424507](https://github.com/storybooks/storybook/pull/212424507)
|
||||
- Replace String.includes with String.indexOf: cross-browsing support [#212267933](https://github.com/storybooks/storybook/pull/212267933)
|
||||
- Issue Triage instructions [#219466650](https://github.com/storybooks/storybook/pull/219466650)
|
||||
- Simple pull request template [#218781679](https://github.com/storybooks/storybook/pull/218781679)
|
||||
- Make return type of StoryDecorator nullable [#204247531](https://github.com/storybooks/storybook/pull/204247531)
|
||||
- Warn if story with a given name already exists [#200820130](https://github.com/storybooks/storybook/pull/200820130)
|
||||
- Fix spelling mistake - "element form the story" to "element from the story" [#209336442](https://github.com/storybooks/storybook/pull/209336442)
|
||||
- Remove broken react-button example [#208526023](https://github.com/storybooks/storybook/pull/208526023)
|
||||
- Fixed spelling error. [#213588926](https://github.com/storybooks/storybook/pull/213588926)
|
||||
- Cleaner error handling for storiesOf [#201531268](https://github.com/storybooks/storybook/pull/201531268)
|
||||
- Update links to point to new organization [#213621294](https://github.com/storybooks/storybook/pull/213621294)
|
||||
|
||||
</details>
|
||||
|
||||
# v2.35.3
|
||||
|
||||
Allow customConfig to override devtool. [PR668](https://github.com/storybooks/react-storybook/pull/668)
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-actions",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "Action Logger addon for storybook",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
@ -27,7 +27,7 @@
|
||||
"shelljs": "^0.7.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "^3.0.0-rc.3",
|
||||
"@storybook/addons": "^3.0.0",
|
||||
"deep-equal": "^1.0.1",
|
||||
"json-stringify-safe": "^5.0.1",
|
||||
"prop-types": "^15.5.8",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-centered",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "Storybook decorator to center components",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-comments",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "Comments addon for Storybook",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -23,7 +23,7 @@
|
||||
"storybook-remote": "start-storybook -p 3006"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "^3.0.0-rc.3",
|
||||
"@storybook/addons": "^3.0.0",
|
||||
"babel-runtime": "^6.23.0",
|
||||
"deep-equal": "^1.0.1",
|
||||
"events": "^1.1.1",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-graphql",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "Storybook addon to display the GraphiQL IDE",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-info",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "A Storybook addon to show additional information for your stories.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -23,7 +23,7 @@
|
||||
"react": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "^3.0.0-rc.3",
|
||||
"@storybook/addons": "^3.0.0",
|
||||
"babel-runtime": "^6.23.0",
|
||||
"markdown-to-react-components": "^0.2.1",
|
||||
"prop-types": "^15.5.8",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-knobs",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "Storybook Addon Prop Editor Component",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
7
addons/knobs/storybook-addon-knobs.d.ts
vendored
7
addons/knobs/storybook-addon-knobs.d.ts
vendored
@ -17,10 +17,6 @@ interface NumberOptions {
|
||||
step: number,
|
||||
}
|
||||
|
||||
interface withKnobs {
|
||||
(storyFn: Function, context: StoryContext): React.ReactElement<IWrapStoryProps>;
|
||||
}
|
||||
|
||||
export function knob<T>(name: string, options: KnobOption<T>): T;
|
||||
|
||||
export function text(name: string, value: string | null): string;
|
||||
@ -46,4 +42,5 @@ interface IWrapStoryProps {
|
||||
initialContent?: Object;
|
||||
}
|
||||
|
||||
export function withKnobsOptions(options: Object): (storyFn: Function, context: StoryContext) => withKnobs;
|
||||
export function withKnobs(storyFn: Function, context: StoryContext): React.ReactElement<IWrapStoryProps>;
|
||||
export function withKnobsOptions(options: Object): (storyFn: Function, context: StoryContext) => React.ReactElement<IWrapStoryProps>;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-links",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "Story Links addon for storybook",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
@ -26,7 +26,7 @@
|
||||
"shelljs": "^0.7.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "^3.0.0-rc.3"
|
||||
"@storybook/addons": "^3.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-notes",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "Write notes for your Storybook stories.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-options",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "Options addon for storybook",
|
||||
"main": "preview.js",
|
||||
"scripts": {
|
||||
@ -26,7 +26,7 @@
|
||||
"shelljs": "^0.7.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "^3.0.0-rc.3"
|
||||
"@storybook/addons": "^3.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storyshots",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "StoryShots is a Jest Snapshot Testing Addon for Storybook.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react-native",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "A better way to develop React Native Components for your app",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
@ -34,11 +34,11 @@
|
||||
"react-native": "^0.43.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addon-actions": "^3.0.0-rc.3",
|
||||
"@storybook/addon-links": "^3.0.0-rc.3",
|
||||
"@storybook/addons": "^3.0.0-rc.3",
|
||||
"@storybook/channel-websocket": "^3.0.0-rc.3",
|
||||
"@storybook/ui": "^3.0.0-rc.3",
|
||||
"@storybook/addon-actions": "^3.0.0",
|
||||
"@storybook/addon-links": "^3.0.0",
|
||||
"@storybook/addons": "^3.0.0",
|
||||
"@storybook/channel-websocket": "^3.0.0",
|
||||
"@storybook/ui": "^3.0.0",
|
||||
"autoprefixer": "^7.0.1",
|
||||
"babel-core": "^6.24.1",
|
||||
"babel-loader": "^7.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
||||
"license": "MIT",
|
||||
"main": "dist/client/index.js",
|
||||
@ -23,11 +23,11 @@
|
||||
"prepublish": "node ../../scripts/prepublish.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addon-actions": "^3.0.0-rc.3",
|
||||
"@storybook/addon-links": "^3.0.0-rc.3",
|
||||
"@storybook/addons": "^3.0.0-rc.3",
|
||||
"@storybook/channel-postmessage": "^3.0.0-rc.3",
|
||||
"@storybook/ui": "^3.0.0-rc.3",
|
||||
"@storybook/addon-actions": "^3.0.0",
|
||||
"@storybook/addon-links": "^3.0.0",
|
||||
"@storybook/addons": "^3.0.0",
|
||||
"@storybook/channel-postmessage": "^3.0.0",
|
||||
"@storybook/ui": "^3.0.0",
|
||||
"airbnb-js-shims": "^1.1.1",
|
||||
"autoprefixer": "^7.1.1",
|
||||
"babel-core": "^6.24.1",
|
||||
|
@ -89,7 +89,7 @@ storiesOf('Button', module)
|
||||
|
||||
Native addons use Storybook as a platform and interact with it. Native addons can add extra features beyond wrapping stories.
|
||||
|
||||
For example, [storybook-actions](https://github.com/storybooks/storybook/tree/master/addon/actions) is such an addon.
|
||||
For example, [storybook-actions](https://github.com/storybooks/storybook/tree/master/addons/actions) is such an addon.
|
||||
|
||||

|
||||
|
||||
|
@ -3,11 +3,11 @@ id: 'using-addons'
|
||||
title: 'Using Addons'
|
||||
---
|
||||
|
||||
Storybook comes with a variety of "core" addons developed and maintained alongside Storybook. Most examples in this site use [actions](https://github.com/storybooks/storybook/tree/master/addon/actions) and [links](https://github.com/storybooks/storybook/tree/master/addon/links). But it's easy to use any third party addons distributed via NPM.
|
||||
Storybook comes with a variety of "core" addons developed and maintained alongside Storybook. Most examples in this site use [actions](https://github.com/storybooks/storybook/tree/master/addons/actions) and [links](https://github.com/storybooks/storybook/tree/master/addons/links). But it's easy to use any third party addons distributed via NPM.
|
||||
|
||||
Here's how to do it.
|
||||
|
||||
We are going to use an addon called [Notes](https://github.com/storybooks/storybook/tree/master/addon/notes). Basically, it allows you to write notes for your stories.
|
||||
We are going to use an addon called [Notes](https://github.com/storybooks/storybook/tree/master/addons/notes). Basically, it allows you to write notes for your stories.
|
||||
|
||||
First, we need to install the addons:
|
||||
|
||||
|
@ -19,7 +19,7 @@ Here are all those options:
|
||||
-V, --version output the version number
|
||||
-p, --port [number] Port to run Storybook (Required)
|
||||
-h, --host [string] Host to run Storybook
|
||||
-s, --static-dir <dir-names> Directory where to load static files from
|
||||
-s, --static-dir <dir-names> Directory where to load static files from, comma-separated list
|
||||
-c, --config-dir [dir-name] Directory where to load Storybook configurations from
|
||||
|
||||
## For build-storybook
|
||||
@ -30,6 +30,6 @@ Here are all those options:
|
||||
|
||||
-h, --help output usage information
|
||||
-V, --version output the version number
|
||||
-s, --static-dir <dir-names> Directory where to load static files from
|
||||
-s, --static-dir <dir-names> Directory where to load static files from, comma-separated list
|
||||
-o, --output-dir [dir-name] Directory where to store built files
|
||||
-c, --config-dir [dir-name] Directory where to load Storybook configurations from
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
"lerna": "2.0.0-rc.5",
|
||||
"version": "3.0.0-rc.3",
|
||||
"commands": {
|
||||
"bootstrap": {
|
||||
"ignore": [
|
||||
@ -20,5 +19,6 @@
|
||||
"lib/*",
|
||||
"examples/*"
|
||||
],
|
||||
"concurrency": 1
|
||||
"concurrency": 1,
|
||||
"version": "3.0.0"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addons",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "Storybook addons store",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channel-postmessage",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
@ -11,7 +11,7 @@
|
||||
"shelljs": "^0.7.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "^3.0.0-rc.3",
|
||||
"@storybook/channels": "^3.0.0",
|
||||
"json-stringify-safe": "^5.0.1"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channel-websocket",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
@ -11,6 +11,6 @@
|
||||
"shelljs": "^0.7.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "^3.0.0-rc.3"
|
||||
"@storybook/channels": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channels",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/cli",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "Storybook's CLI - easiest method of adding storybook to your projects",
|
||||
"bin": {
|
||||
"getstorybook": "./bin/generate.js"
|
||||
@ -21,7 +21,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/storybooks/storybook/tree/master/lib/cli",
|
||||
"dependencies": {
|
||||
"@storybook/codemod": "^3.0.0-rc.3",
|
||||
"@storybook/codemod": "^3.0.0",
|
||||
"chalk": "^1.1.3",
|
||||
"child-process-promise": "^2.2.1",
|
||||
"commander": "^2.9.0",
|
||||
|
@ -17,7 +17,7 @@ npm install jscodeshift
|
||||
npm install @storybook/codemod
|
||||
```
|
||||
|
||||
- `@storybook/codemod` is out collection of codemod scripts.
|
||||
- `@storybook/codemod` is our collection of codemod scripts.
|
||||
- `jscodeshift` is a tool we use to apply our codemods.
|
||||
|
||||
After running the migration commands, you can remove them from your `package.json`, if you added them.
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@storybook/codemod",
|
||||
"description": "A collection of codemod scripts written with JSCodeshift",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/ui",
|
||||
"version": "3.0.0-rc.3",
|
||||
"version": "3.0.0",
|
||||
"description": "Core Storybook UI",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
Loading…
x
Reference in New Issue
Block a user