UNPKG

2.34 kBMarkdownView Raw
1# Contributing to React Storybook
2
3We 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
7No 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
18We 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
25Before 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
31This project written in ES2016+ syntax so, we need to transpile it before use.
32So run the following command:
33
34```
35npm run dev
36```
37
38This will watch files and transpile.
39
40### Linking
41
42First of all link this repo with:
43
44```sh
45npm link
46```
47
48In order to test features you add, you may need to link the local copy of this repo.
49For that we need a sample project. Let's create it.
50
51```sh
52npm i -g create-react-app getstorybook
53create-react-app my-demo-app
54cd my-demo-app
55getstorybook
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
61Then link storybook inside the sample project with:
62
63```sh
64npm link @kadira/storybook
65```
66
67### Getting Changes
68
69After you've done any change, you need to run the `npm run storybook` command everytime to see those changes.