From 9b590923358380401a7a9c5974abacdc0b697cba Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Mon, 1 May 2017 15:09:55 +1000 Subject: [PATCH 1/3] First pass at update the contribution instructions See https://github.com/storybooks/storybook/issues/756#issuecomment-297923933 We should actually ensure this works consistently for people before making this change. --- CONTRIBUTING.md | 45 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 49f910e8b776..b5a732ab4773 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,28 +15,55 @@ No software is bug free. So, if you got an issue, follow these steps: * Share error logs, screenshots and etc. * To speed up the issue fixing process, send us a sample repo with the issue you faced: +### Testing against `master` + +To test your project against the current latest version of storybook, you can clone the repository and link it with `npm`. Try following these steps: + +1. Download the latest version of this project, and build it + + ``` + git clone https://github.com/storybooks/storybook.git + cd storybook + npm install + ``` + +2. Link `storybook` and any other required dependencies + + ``` + cd packages/react-storybook + npm link + + cd + npm link @kadira/storybook + + # repeat with whichever other parts of the monorepo you are using. + ``` + ### Reproductions -The best way to help figure out an issue you are having is to produce a minimal reproduction. A good way to do that is using Create React App: +The best way to help figure out an issue you are having is to produce a minimal reproduction against the `master` branch. + +A good way to do that is using the example `test-cra` app embedded in this repository: ```bash -npm install --global create-react-app getstorybook +# Download and build this repository: +git clone https://github.com/storybooks/storybook.git +cd storybook +npm install -create-react-app reproduction -cd reproduction -getstorybook +cd examples/test-cra # make changes to try and reproduce the problem, such as adding components + stories npm start storybook # see if you can see the problem, if so, commit it: -git init +git checkout "branch-describing-issue" git add -A git commit -m "reproduction for issue #123" -# create an new repository on github to host the reproduction, then: -git remote add origin https://github.com// -git push -u origin master +# fork the storybook repo to your account, then add the resulting remote +git remote add https://github.com//storybook.git +git push -u master ``` If you follow that process, you can then link to the github repository in the issue. See https://github.com/storybooks/storybook/issues/708#issuecomment-290589886 for an example. From 472c07d85f8b32f1d6dee08081f5eb4943a3fc96 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 9 May 2017 07:27:22 +0200 Subject: [PATCH 2/3] Update CONTRIBUTING.md --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b5a732ab4773..61818b7357bf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,6 +25,7 @@ To test your project against the current latest version of storybook, you can cl git clone https://github.com/storybooks/storybook.git cd storybook npm install + npm run bootstrap ``` 2. Link `storybook` and any other required dependencies From 8a494d3cd7bece283fd0248fedcc7b53225823b5 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 9 May 2017 07:28:52 +0200 Subject: [PATCH 3/3] Update CONTRIBUTING.md --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 61818b7357bf..8d616f593a76 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,6 +51,7 @@ A good way to do that is using the example `test-cra` app embedded in this repos git clone https://github.com/storybooks/storybook.git cd storybook npm install +npm run bootstrap cd examples/test-cra