1 | # Contributing to React Native Material Kit
|
2 |
|
3 | Thank you for contributing to [RNMK]! :metal:
|
4 |
|
5 | ## Reporting Bugs
|
6 |
|
7 | - Before filing a new task, try to make sure it doesn't already exist.
|
8 | - Provide environment informations, such as RN version, RNMK version, OS version etc.
|
9 | - Provide error logs or stack trace if possible. For UI issues, screenshots are helpful.
|
10 | - Try to provide a reduced test case. Either a public repository with a runnable example or a [React Native Playground](https://rnplay.org/) snippet.
|
11 |
|
12 | ## Component Contributions
|
13 |
|
14 | - Test your components on both iOS and Android platform
|
15 | - ***Try*** to keep compatible with the oldest version of RN which RNMK supports ([Where to find it?][rnmk-rn-version])
|
16 | - Demonstrating the new components in [RNMK Demos]
|
17 | - Add showcases and brief examples to `README.md`
|
18 | - Components should be organized in alphabet order
|
19 |
|
20 | [rnmk-rn-version]: https://github.com/xinthink/react-native-material-kit/blob/master/package.json#L25
|
21 | [RNMK Demos]: https://github.com/xinthink/rnmk-demo
|
22 |
|
23 | ## Style Guide for Code Contributions
|
24 |
|
25 | ### General
|
26 |
|
27 | * Replacing tabs with spaces
|
28 | * End files with a single newline character
|
29 | * "Attractive"
|
30 |
|
31 | ### JavaScript/JSX
|
32 |
|
33 | * 2 spaces for indentation (no tabs)
|
34 | * Prefer ES6/ES7 syntax
|
35 | * Add trailing commas, ([*Why?*](https://github.com/airbnb/javascript#19.2))
|
36 | * Use single-line comments with markdown syntax for documentation (I’m using a documentation generator called [Docco])
|
37 | * [Airbnb JavaScript Style Guide]
|
38 | * [Airbnb React/JSX Style Guide]
|
39 |
|
40 | [Airbnb JavaScript Style Guide]: https://github.com/airbnb/javascript
|
41 | [Airbnb React/JSX Style Guide]: https://github.com/airbnb/javascript/tree/master/react
|
42 | [Docco]: https://jashkenas.github.io/docco/
|
43 |
|
44 | ### Objective-C
|
45 |
|
46 | * Space after `@property` declarations
|
47 | * Brackets on *every* `if`, on the *same* line
|
48 | * `- method`, `@interface`, and `@implementation` brackets on the following line
|
49 | * *Try* to keep it around 80 characters line length (sometimes it's just not possible...)
|
50 | * `*` operator goes with the variable name (e.g. `NSObject *variableName;`)
|
51 | * [Objective-C Style Guide]
|
52 |
|
53 | [Objective-C Style Guide]: https://github.com/raywenderlich/objective-c-style-guide
|
54 |
|
55 | ### Java
|
56 |
|
57 | * [Java Style Guide]
|
58 |
|
59 | [Java Style Guide]: https://github.com/raywenderlich/java-style-guide
|
60 |
|
61 | ## License
|
62 |
|
63 | By contributing to [React Native Material Kit][RNMK], you agree that your contributions will be licensed under its [MIT license].
|
64 |
|
65 | [RNMK]: https://github.com/xinthink/react-native-material-kit
|
66 | [MIT license]: https://raw.githubusercontent.com/xinthink/react-native-material-kit/master/LICENSE.md
|