1 | # Contributing to React Storybook
|
2 |
|
3 | We welcome you help to make React Storybook better. This document will help to streamline the contributing process and save everyone's precious time.
|
4 |
|
5 | ## Issues
|
6 |
|
7 | No software is bug free. So, if you got an issue, follow these steps:
|
8 |
|
9 | * Search the [issue list](https://github.com/kadirahq/react-storybook/issues?utf8=%E2%9C%93&q=) for current and old issues.
|
10 | * If non of that is helping, create an issue with with following information:
|
11 | * Clear title (make is shorter if possible).
|
12 | * Describe the issue in clear language.
|
13 | * Share error logs, screenshots and etc.
|
14 | * To speed up the issue fixing process, send us a sample repo with the issue you faced.
|
15 |
|
16 | ## Pull Requests (PRs)
|
17 |
|
18 | We welcome your contributions. There are many ways you can help us. This is few of those ways:
|
19 |
|
20 | * Fix typos and add more documentation.
|
21 | * Try to fix some [bugs](https://github.com/kadirahq/react-storybook/labels/bug).
|
22 | * Work on [enhancements](https://github.com/kadirahq/react-storybook/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) and new [features](https://github.com/kadirahq/react-storybook/issues?q=is%3Aissue+is%3Aopen+label%3Afeature).
|
23 | * Add more tests (specially for the UI).
|
24 |
|
25 | Before you submit a new PR, make you to run `npm test`. Do not submit a PR if tests are failing. If you need any help, create an issue and ask.
|
26 |
|
27 | ## Development Guide
|
28 |
|
29 | > If you want to work on a UI feature, refer to the [Storybook UI](https://github.com/kadirahq/storybook-ui) project.
|
30 |
|
31 | This project written in ES2016+ syntax so, we need to transpile it before use.
|
32 | So run the following command:
|
33 |
|
34 | ```
|
35 | npm run dev
|
36 | ```
|
37 |
|
38 | This will watch files and transpile.
|
39 |
|
40 | ### Linking
|
41 |
|
42 | First of all link this repo with:
|
43 |
|
44 | ```sh
|
45 | npm link
|
46 | ```
|
47 |
|
48 | In order to test features you add, you may need to link the local copy of this repo.
|
49 | For that we need a sample project. Let's create it.
|
50 |
|
51 | ```sh
|
52 | npm i -g create-react-app getstorybook
|
53 | create-react-app my-demo-app
|
54 | cd my-demo-app
|
55 | getstorybook
|
56 | ```
|
57 |
|
58 | > It's pretty important to create a very simple sample project like above.
|
59 | > Otherwise some of the functionality won't work because of likning.
|
60 |
|
61 | Then link storybook inside the sample project with:
|
62 |
|
63 | ```sh
|
64 | npm link @kadira/storybook
|
65 | ```
|
66 |
|
67 | ### Getting Changes
|
68 |
|
69 | After you've done any change, you need to run the `npm run storybook` command everytime to see those changes.
|