|
1 | 1 | # Contributing |
2 | | - |
3 | | -[](https://david-dm.org/pburtchaell/react-notification) [](https://travis-ci.org/pburtchaell/react-notification) |
4 | | - |
5 | | -**It is imperative that pull requests include tests and documentation and issues follow guidelines.** Please be familar with the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/) before contributing to this project. If you are new to open source, check out this 38 minute course on [how to contribute to open source on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github). It's free! :smile: |
| 2 | +Please familize yourself with the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/) before contributing. |
6 | 3 |
|
7 | 4 | ## Getting Started |
8 | 5 |
|
9 | 6 | 1. Clone the repository |
10 | | -2. Install dependencies: `npm install`, or, if you use Yarn: `yarn` |
| 7 | +2. Install dependencies: `npm install` |
11 | 8 | 3. Run tests: `npm test` |
12 | | -4. Run example: `npm start` |
13 | | - |
14 | | -## Need Help? :raising_hand: |
15 | | - |
16 | | -It's okay to ask for help via a GitHub issue, but first read the ["Filing an Issue"](#filing-an-issue) guide and consider: |
17 | | - |
18 | | -* Is my issue specific to this project? |
19 | | -* Is [StackOverflow](http://stackoverflow.com/questions/ask) a better place to ask for help? If yes, use the **#react** and **#react-notification** tags. |
20 | | -* Can I reduce the code example to the bare minimum required to explain what I need help with? |
21 | | -* Can I create a [JSBin](https://jsbin.com/?html,output) for the code example? |
22 | | -* Can I explain what the expected behavior is? |
23 | | -* Can I explain what the actual beavior is? |
24 | | - |
25 | | -## Found a Bug? |
26 | | - |
27 | | -**The best bug report is a failing test in the repository as a pull request.** Please refer to the ["Filing an Issue"](#filing-an-issue) guide and include: |
28 | | - |
29 | | -* Version number |
30 | | -* Steps to reproduce |
31 | | -* Expected behavior |
32 | | -* Actual behavior |
33 | | - |
34 | | -## Have a Feature Request? |
35 | | - |
36 | | -If you have a feature request, provide commentary and code samples on what this feature means for you. |
37 | | - |
38 | | -* What do you perceive it will enable you to do? |
39 | | -* What potential bugs will be avoided? |
40 | | -* What edge cases will it support? |
41 | | -* Is it a [micro-optimization](http://stackoverflow.com/questions/tagged/micro-optimization). If yes, is it a valuable? |
42 | | - |
43 | | -Please refer to the ["Filing an Issue"](#filing-an-issue) guide. |
44 | | - |
45 | | -## Filing an Issue |
46 | | - |
47 | | -1. Check if a related open issue exists by using search. See the GitHub guide to [searching issues](https://help.github.com/articles/searching-issues/). |
48 | | -2. If a related issue does *not* exist, open an issue. |
49 | | -3. If a related issue does exist, contribute to the conversation there. |
50 | | - |
51 | | -Before you create an issue, consider: |
52 | | - |
53 | | -* Did you describe the problem you are encountering? |
54 | | -* Did you describe the expected behavior? |
55 | | -* Did you provide a formatted code example? See the GitHub guide on [how to format code with Markdown](help.github.com/categories/writing-on-github/). |
56 | | -* Did you include a relevant label? |
57 | | - |
58 | | -If you include all of the above, it is easier to understand you. We respond quicker to formatted, comprehensive issues. |
59 | | - |
60 | | -Please keep in mind that issues should *contribute* to the community. The primary function of issues should be for bugs and feature requests. If you open an issue asking for help, that's fine. However, if you do not provide context or code examples, the issue will be closed and you will be redirected to this document. |
61 | | - |
62 | | -## Making a Contribution |
| 9 | +4. Run examples: `npm start` |
63 | 10 |
|
64 | | -1. Check [the issues](https://github.com/pburtchaell/react-notification/issues) for "help wanted" labels. |
65 | | -2. Check if there is a pull request already open for this issue. If there is, please do not duplicate efforts. |
66 | | -3. Commit the changes required to resolve the issue. Git commit messages [should be written in the imperative](http://chris.beams.io/posts/git-commit/). A pre-commit hook will run tests and lint code. If needed, you can force a commit with `--no-verify`. |
67 | | -4. If needed, add one or more unit test(s). **For new features and bug fixes, a unit test is required.** Follow the [red/green/refactor process](https://en.wikipedia.org/wiki/Test-driven_development#Development_style). |
68 | | -5. Run tests and linter: `npm test`. Code is linted using ES Lint. Rules are located in `.eslintrc`. You must maintain the existing code style. **Tests must pass before the PR is merged.** |
69 | | -6. Document new features and/or API changes. |
| 11 | +### File Organization |
| 12 | +All code is written in JavaScript and transpiled using Babel. |
70 | 13 |
|
71 | | -If you add a new dependency (for the package or development), you will need to use [Yarn](https://yarnpkg.com/) to update the `yarn.lock` file with the dependency version. By installing depdencies faster than npm, Yarn drastically decreases the time it takes to run builds on continuous integration. |
| 14 | +Source files are located in the `src` directory. Test files are located in the `test` directory. |
72 | 15 |
|
73 | | -## File organization |
| 16 | +### Git |
| 17 | +Git commit messages [should be written in the imperative](http://chris.beams.io/posts/git-commit/). |
74 | 18 |
|
75 | | -All code, including tests, is written in next-generation JavaScript and transpiled using Babel. Source files are located in `src` and transpiled to `dist`, which is gitignored. Tests should be placed in a `test` directory. |
| 19 | +A pre-commit hook will run tests and lint code when you make a commit. If needed, you can force a commit with `--no-verify`. |
76 | 20 |
|
| 21 | +### Tests |
| 22 | +Tests are written in Mocha and code style is maintained with ESLint. |
0 commit comments