Skip to content

Commit 9205357

Browse files
chore: publish first version of documentation
1 parent a5767fb commit 9205357

File tree

4 files changed

+341
-489
lines changed

4 files changed

+341
-489
lines changed

CONTRIBUTING.md

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# How to contribute
2+
3+
## Before you begin
4+
5+
### Sign our Contributor License Agreement
6+
7+
Contributions to this project must be accompanied by a
8+
[Contributor License Agreement](https://cla.developers.google.com/about) (CLA).
9+
You (or your employer) retain the copyright to your contribution; this simply
10+
gives us permission to use and redistribute your contributions as part of the
11+
project.
12+
13+
If you or your current employer have already signed the Google CLA (even if it
14+
was for a different project), you probably don't need to do it again.
15+
16+
Visit <https://cla.developers.google.com/> to see your current agreements or to
17+
sign a new one.
18+
19+
### Review our community guidelines
20+
21+
This project follows
22+
[Google's Open Source Community Guidelines](https://opensource.google/conduct/).
23+
24+
## Contribution process
25+
26+
## 1. Things you will need
27+
28+
- Linux, Mac OS X, or Windows.
29+
- [git](https://git-scm.com) (used for source version control).
30+
- An IDE such as [Android Studio](https://developer.android.com/studio) or [Visual Studio Code](https://code.visualstudio.com/).
31+
32+
## 2. Forking & cloning the repository
33+
34+
- Ensure all the dependencies described in the [README](./README.md) are installed.
35+
- Fork `https://github.com/googlemaps/react-native-driver-sdk` into your own GitHub account. If
36+
you already have a fork, and are now installing a development environment on
37+
a new machine, make sure you've updated your fork.
38+
- If you haven't configured your machine with an SSH key that's known to github, then
39+
follow [GitHub's directions](https://help.github.com/articles/generating-ssh-keys/)
40+
to generate an SSH key.
41+
- `git clone [email protected]:<your_name_here>/googlemaps/react-native-driver-sdk`
42+
- `git remote add upstream [email protected]:googlemaps/react-native-driver-sdk` (So that you
43+
fetch from the master repository, not your clone, when running `git fetch`
44+
et al.)
45+
46+
## 3. Updating the library
47+
48+
There are several ways to update the library and test your changes locally. The easiest approach is to modify the codes directly from node_modules folder so that any changes can be tested with the sample app right away. Simply open the project directory of the sample app under ios/android.
49+
50+
### iOS
51+
52+
To do this for iOS, open the workspace file and this will give you access to library.
53+
54+
![iosWorkspace](/images/ios_asset.png)
55+
56+
57+
### Android
58+
59+
To do this for Android, open the Android project directly like you would normally open an Android project
60+
61+
![androidProject](/images/android_asset.png)
62+
63+
64+
### Javascript
65+
66+
To update the Javascript codes, edit the library files inside node_modules
67+
68+
![rnProject](/images/javascript_asset.png)
69+
70+
71+
### Testing
72+
73+
Simply run the sample app to test your changes.
74+
75+
## Submitting changes
76+
77+
Copy your changes from the node_modules folder and paste it over to the root directory. Don't copy the entire contents of the node_modules, instead just copy the changes you made. This process can also be optimized with shell commands.
78+
79+
### Android
80+
81+
![rnProjectAndroid](/images/submit_android.png)
82+
83+
84+
### iOS
85+
86+
Just copy the .m and .h files. There's no need to copy the .xcodeproj file unless new files are added to the library.
87+
88+
![rnProjectXcode](/images/submit_ios.png)
89+
90+
91+
### Javacript
92+
93+
![rnProjectJS](/images/submit_javascript.png)
94+
95+
96+
### Code reviews
97+
98+
All submissions, including submissions by project members, require review. We
99+
use GitHub pull requests for this purpose. Consult
100+
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
101+
information on using pull requests.
102+
103+
Please peruse the
104+
[Typescript style guide](https://google.github.io/styleguide/tsguide.html), [Java style guide](https://google.github.io/styleguide/javaguide.html), and [Objective-C style guide](https://google.github.io/styleguide/objcguide.html) before
105+
working on anything non-trivial. These guidelines are intended to
106+
keep the code consistent and avoid common pitfalls.
107+
108+
#### Create branch
109+
110+
1. `git fetch upstream`
111+
2. `git checkout upstream/master -b <name_of_your_branch>`
112+
3. Start coding!
113+
114+
#### Commit changes
115+
116+
1. `git commit -a -m "<your informative commit message>"`
117+
118+
Please make sure all your check-ins have detailed commit messages explaining the patch.
119+
When naming the title of your pull request, please follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/) guide. For example, for a fix to the Driver library:
120+
121+
`fix(navigation_view): fixed a bug!`
122+
123+
2. `git push origin <name_of_your_branch>`
124+
125+
#### Create pull request
126+
127+
1. `git pull-request` (if you are using [Hub](http://github.com/github/hub/)) or
128+
go to `https://github.com/googlemaps/react-native-driver-sdk` and click the
129+
"Compare & pull request" button

0 commit comments

Comments
 (0)