Skip to content

Commit

Permalink
Merge pull request storybookjs#7848 from storybookjs/tech/add-docs-to…
Browse files Browse the repository at this point in the history
…-standalone

Addon-docs: Add docs to standalone example
  • Loading branch information
shilman authored Jul 6, 2021
2 parents 76d155e + 45ddb57 commit 52623ee
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 37 deletions.
1 change: 1 addition & 0 deletions examples/standalone-preview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"storybook": "parcel ./storybook.html --port 1337"
},
"devDependencies": {
"@storybook/addon-docs": "6.4.0-alpha.11",
"@storybook/react": "6.4.0-alpha.11",
"parcel": "^1.12.4",
"react": "16.14.0",
Expand Down
1 change: 1 addition & 0 deletions examples/standalone-preview/storybook.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
</head>
<body>
<div id="root"></div>
<div id="docs-root"></div>
<script src="./storybook.ts"></script>
<div class="sb-errordisplay sb-wrapper">
<div id="error-message" class="sb-heading"></div>
Expand Down
11 changes: 10 additions & 1 deletion examples/standalone-preview/storybook.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import { configure } from '@storybook/react';
import { configure, addParameters } from '@storybook/react';
import { DocsPage, DocsContainer } from '@storybook/addon-docs';

import * as Comp1 from './stories/Component1.stories';
import * as Comp2 from './stories/Component2.stories';

addParameters({
docs: {
page: DocsPage,
container: DocsContainer,
},
});

configure(() => [Comp1, Comp2], module);
72 changes: 36 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,42 @@
"webpack-dev-middleware": "^3.7.3",
"window-size": "^1.1.1"
},
"dependenciesMeta": {
"@compodoc/compodoc": {
"built": false
},
"core-js": {
"built": false
},
"core-js-pure": {
"built": false
},
"ejs": {
"built": false
},
"level": {
"built": false
},
"node-uuid": {
"built": false,
"unplugged": false
},
"nodemon": {
"built": false
},
"parcel": {
"built": false
},
"preact": {
"built": false
},
"styled-components": {
"built": false
},
"yorkie": {
"built": false
}
},
"optionalDependencies": {
"@cypress/webpack-preprocessor": "^5.7.0",
"cypress": "6.8.0",
Expand Down Expand Up @@ -323,41 +359,5 @@
"Other"
]
]
},
"dependenciesMeta": {
"@compodoc/compodoc": {
"built": false
},
"core-js": {
"built": false
},
"core-js-pure": {
"built": false
},
"ejs": {
"built": false
},
"level": {
"built": false
},
"node-uuid": {
"built": false,
"unplugged": false
},
"nodemon": {
"built": false
},
"parcel": {
"built": false
},
"preact": {
"built": false
},
"styled-components": {
"built": false
},
"yorkie": {
"built": false
}
}
}
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -39619,6 +39619,7 @@ resolve@1.19.0:
version: 0.0.0-use.local
resolution: "standalone-preview@workspace:examples/standalone-preview"
dependencies:
"@storybook/addon-docs": 6.4.0-alpha.11
"@storybook/react": 6.4.0-alpha.11
parcel: ^1.12.4
react: 16.14.0
Expand Down

0 comments on commit 52623ee

Please sign in to comment.