mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 22:21:27 +08:00
Merge branch 'next' into imgbot
This commit is contained in:
commit
2839973add
@ -30,6 +30,8 @@ cd storybook
|
||||
yarn bootstrap
|
||||
```
|
||||
|
||||
> NOTE: on windows you may need to run `yarn` before `yarn bootstrap`!
|
||||
|
||||
The bootstrap command might ask which sections of the codebase you want to bootstrap. Unless you're going to work with ReactNative or the Documentation, you can keep the default.
|
||||
|
||||
You can also pick directly from CLI:
|
||||
@ -140,6 +142,8 @@ git clone https://github.com/storybookjs/storybook.git
|
||||
cd storybook
|
||||
yarn bootstrap --core
|
||||
|
||||
# NOTE: on windows you may need to run `yarn` before `yarn bootstrap`!
|
||||
|
||||
# make changes to try and reproduce the problem, such as adding components + stories
|
||||
cd examples/cra-kitchen-sink
|
||||
yarn storybook
|
||||
@ -263,10 +267,11 @@ If you run into trouble here, make sure your node, npm, and **_yarn_** are on th
|
||||
1. `cd ~` (optional)
|
||||
2. `git clone https://github.com/storybookjs/storybook.git` _bonus_: use your own fork for this step
|
||||
3. `cd storybook`
|
||||
4. `yarn`
|
||||
5. `yarn bootstrap --core`
|
||||
6. `yarn test --core`
|
||||
7. `yarn dev` _You must have this running for your changes to show up_
|
||||
4. `yarn bootstrap --core`
|
||||
5. `yarn test --core`
|
||||
6. `yarn dev` _You must have this running for your changes to show up_
|
||||
|
||||
> NOTE: on windows you may need to run `yarn` before `yarn bootstrap` (between steps 3 and 4).
|
||||
|
||||
#### Bootstrapping everything
|
||||
|
||||
|
@ -1,58 +0,0 @@
|
||||
{
|
||||
"name": "@storybook/addon-notes",
|
||||
"version": "6.0.0-alpha.6",
|
||||
"description": "Write notes for your Storybook stories.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
"notes",
|
||||
"storybook"
|
||||
],
|
||||
"homepage": "https://github.com/storybookjs/storybook/tree/master/addons/notes",
|
||||
"bugs": {
|
||||
"url": "https://github.com/storybookjs/storybook/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/storybookjs/storybook.git",
|
||||
"directory": "addons/notes"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "dist/public_api.js",
|
||||
"types": "dist/public_api.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
],
|
||||
"scripts": {
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.0.0-alpha.6",
|
||||
"@storybook/api": "6.0.0-alpha.6",
|
||||
"@storybook/client-logger": "6.0.0-alpha.6",
|
||||
"@storybook/components": "6.0.0-alpha.6",
|
||||
"@storybook/core-events": "6.0.0-alpha.6",
|
||||
"@storybook/router": "6.0.0-alpha.6",
|
||||
"@storybook/theming": "6.0.0-alpha.6",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"markdown-to-jsx": "^6.10.3",
|
||||
"memoizerific": "^1.11.3",
|
||||
"prop-types": "^15.7.2",
|
||||
"util-deprecate": "^1.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/prop-types": "^15.5.9",
|
||||
"@types/util-deprecate": "^1.0.0",
|
||||
"@types/webpack-env": "^1.15.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "4b9d901add9452525135caae98ae5f78dd8da9ff"
|
||||
}
|
@ -14,7 +14,7 @@ We are going to use an addon called [Notes](https://github.com/storybookjs/story
|
||||
First, we need to install the addons:
|
||||
|
||||
```sh
|
||||
yarn add -D @storybook/addons @storybook/addon-actions @storybook/addon-knobs @storybook/addon-notes
|
||||
yarn add -D @storybook/addons @storybook/addon-actions @storybook/addon-knobs
|
||||
```
|
||||
|
||||
within `.storybook/main.js`:
|
||||
@ -24,7 +24,6 @@ module.exports = {
|
||||
addons: [
|
||||
'@storybook/addon-actions/register',
|
||||
'@storybook/addon-knobs/register',
|
||||
'@storybook/addon-notes/register',
|
||||
],
|
||||
};
|
||||
```
|
||||
|
@ -327,7 +327,7 @@ When you are developing your addon as a package, you can't use `npm link` to add
|
||||
```json
|
||||
{
|
||||
"dependencies": {
|
||||
"@storybook/addon-notes": "file:///home/username/myrepo"
|
||||
"@storybook/addon-custom": "file:///home/username/myrepo"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { moduleMetadata } from '@storybook/angular';
|
||||
import { Story, Meta } from '@storybook/addon-docs/blocks';
|
||||
import { Story, Meta, Props } from '@storybook/addon-docs/blocks';
|
||||
import { Welcome, Button } from '@storybook/angular/demo';
|
||||
import { linkTo } from '@storybook/addon-links';
|
||||
import { text, withKnobs } from '@storybook/addon-knobs';
|
||||
import { ButtonComponent } from './doc-button/doc-button.component';
|
||||
|
||||
# Storybook Docs for Angular
|
||||
|
||||
@ -74,6 +75,12 @@ Let's add another one. The UI updates automatically as you'd expect.
|
||||
}}
|
||||
</Story>
|
||||
|
||||
## Props
|
||||
|
||||
We can automatically generate props tables from Angular components:
|
||||
|
||||
<Props of={ButtonComponent} />
|
||||
|
||||
## More info
|
||||
|
||||
For more info, check out the [Storybook Docs Technical Preview](https://docs.google.com/document/d/1un6YX7xDKEKl5-MVb-egnOYN8dynb5Hf7mq0hipk8JE/edit?usp=sharing).
|
||||
|
@ -21,7 +21,6 @@
|
||||
"@storybook/addon-centered": "6.0.0-alpha.6",
|
||||
"@storybook/addon-knobs": "6.0.0-alpha.6",
|
||||
"@storybook/addon-links": "6.0.0-alpha.6",
|
||||
"@storybook/addon-notes": "6.0.0-alpha.6",
|
||||
"@storybook/addon-options": "6.0.0-alpha.6",
|
||||
"@storybook/addon-storyshots": "6.0.0-alpha.6",
|
||||
"@storybook/addon-storysource": "6.0.0-alpha.6",
|
||||
|
@ -7,7 +7,6 @@ module.exports = {
|
||||
'@storybook/addon-backgrounds',
|
||||
'@storybook/addon-knobs',
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addon-notes',
|
||||
'@storybook/addon-options',
|
||||
],
|
||||
};
|
||||
|
@ -20,7 +20,6 @@
|
||||
"@storybook/addon-centered": "6.0.0-alpha.6",
|
||||
"@storybook/addon-knobs": "6.0.0-alpha.6",
|
||||
"@storybook/addon-links": "6.0.0-alpha.6",
|
||||
"@storybook/addon-notes": "6.0.0-alpha.6",
|
||||
"@storybook/node-logger": "6.0.0-alpha.6",
|
||||
"@storybook/server": "6.0.0-alpha.6",
|
||||
"concurrently": "^5.0.2",
|
||||
|
@ -22,7 +22,6 @@
|
||||
"@storybook/addon-docs": "6.0.0-alpha.6",
|
||||
"@storybook/addon-knobs": "6.0.0-alpha.6",
|
||||
"@storybook/addon-links": "6.0.0-alpha.6",
|
||||
"@storybook/addon-notes": "6.0.0-alpha.6",
|
||||
"@storybook/addon-options": "6.0.0-alpha.6",
|
||||
"@storybook/addon-storyshots": "6.0.0-alpha.6",
|
||||
"@storybook/addon-storysource": "6.0.0-alpha.6",
|
||||
|
@ -18,7 +18,6 @@ import {
|
||||
async function addDependencies(npmOptions, { storyFormat }) {
|
||||
const packages = [
|
||||
'@storybook/angular',
|
||||
'@storybook/addon-notes',
|
||||
'@storybook/addon-actions',
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addons',
|
||||
|
@ -1,4 +1,4 @@
|
||||
module.exports = {
|
||||
stories: ['../src/**/*.stories.ts'],
|
||||
addons: ['@storybook/addon-actions', '@storybook/addon-links', '@storybook/addon-notes'],
|
||||
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
|
||||
};
|
||||
|
@ -1,9 +1,4 @@
|
||||
module.exports = {
|
||||
stories: ['../src/**/*.stories.(ts|mdx)'],
|
||||
addons: [
|
||||
'@storybook/addon-docs',
|
||||
'@storybook/addon-actions',
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addon-notes',
|
||||
],
|
||||
addons: ['@storybook/addon-docs', '@storybook/addon-actions', '@storybook/addon-links'],
|
||||
};
|
||||
|
@ -62,7 +62,6 @@
|
||||
"@storybook/addon-graphql": "6.0.0-alpha.6",
|
||||
"@storybook/addon-knobs": "6.0.0-alpha.6",
|
||||
"@storybook/addon-links": "6.0.0-alpha.6",
|
||||
"@storybook/addon-notes": "6.0.0-alpha.6",
|
||||
"@storybook/addon-options": "6.0.0-alpha.6",
|
||||
"@storybook/addon-storyshots": "6.0.0-alpha.6",
|
||||
"@storybook/addons": "6.0.0-alpha.6",
|
||||
|
4
scripts/bootstrap.js
vendored
4
scripts/bootstrap.js
vendored
@ -137,7 +137,9 @@ function run() {
|
||||
option: '--dll',
|
||||
command: () => {
|
||||
log.info(prefix, 'dll');
|
||||
spawn('lerna run createDlls --scope "@storybook/ui"');
|
||||
setTimeout(() => {
|
||||
spawn('lerna run createDlls --scope "@storybook/ui"');
|
||||
}, 5000);
|
||||
},
|
||||
order: 3,
|
||||
}),
|
||||
|
@ -19855,7 +19855,7 @@ markdown-table@^1.1.0:
|
||||
resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60"
|
||||
integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==
|
||||
|
||||
markdown-to-jsx@^6.10.3, markdown-to-jsx@^6.9.1, markdown-to-jsx@^6.9.3:
|
||||
markdown-to-jsx@^6.9.1, markdown-to-jsx@^6.9.3:
|
||||
version "6.10.3"
|
||||
resolved "https://registry.yarnpkg.com/markdown-to-jsx/-/markdown-to-jsx-6.10.3.tgz#7f0946684acd321125ff2de7fd258a9b9c7c40b7"
|
||||
integrity sha512-PSoUyLnW/xoW6RsxZrquSSz5eGEOTwa15H5eqp3enmrp8esmgDJmhzd6zmQ9tgAA9TxJzx1Hmf3incYU/IamoQ==
|
||||
|
Loading…
x
Reference in New Issue
Block a user