Skip to content

Commit 38d9885

Browse files
committed
Add contribution guide
1 parent f190673 commit 38d9885

File tree

1 file changed

+115
-0
lines changed

1 file changed

+115
-0
lines changed

CONTRIBUTING.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# How to Contribute
2+
3+
Electron-React-Typescript-Webpack(ERTW) Boilerplate is one of Devtography's open-source projects that's under active development. As much as we want to make contributing to this project as easy and transparent as possible, the workflow is not quite there yet. Hopefully, this document makes the process for contributing clear and answers some questions that you might have.
4+
5+
## [Code of Conduct](CODE_OF_CONDUCT.md)
6+
7+
We expect project participants to follow the basic principle that to be kind and respect others participating in this project. Read the [full text](CODE_OF_CONDUCT.md) if you got some time to kill.
8+
9+
## Open Development
10+
11+
All work on ERTW Boilerplate happens directly on [GitHub](/). Both project maintainers and external contributors send pull requests which go through the same review process.
12+
13+
### `develop` is unsafe
14+
15+
The default branch of this project is `develop`. As its name suggests, this is the branch where the development goes. We will do our best to keep `develop` in good shape, with tests passing at all times, but please bear in mind that unreleased changes are included in this branch, which from time to time might need some fixes before they make it into `master` a.k.a. the next release.
16+
17+
### Workflow and Pull Requests
18+
19+
The maintainers will be monitoring for pull requests. When we get one, the CI will run some checks and tests on it first. If there's any failed checks/tests, we'd ask you to fix those first if that's needed. From here, the maintainers will will sign off on the changes and then merge the pull request. We'll do our best to provide updates and feedback throughout the process.
20+
21+
_Before_ submitting a pull request, please make sure the following is done:
22+
23+
1. Fork the repo and create your own branch from `develop`. A guide on how to fork a repository: https://help.github.com/articles/fork-a-repo/
24+
25+
Open terminal (e.g. Terminal, iTerm, Git Bash or Git Shell) and type:
26+
27+
```sh-session
28+
$ git clone https://github.com/<your_username>/electron-react-typescript-webpack-boilerplate.git
29+
$ cd electron-react-typescript-webpack-boilerplate
30+
$ git checkout -b <your_branch>
31+
```
32+
33+
Note: Replace `<your_username>` with your GitHub username and `<your_branch>` with your branch name
34+
35+
1. Make sure you have `python` installed. Python is required by [node-gyp](https://github.com/nodejs/node-gyp) that is used when running `npm install`.
36+
37+
To check your version of Python and ensure it's installed your can type:
38+
39+
```sh
40+
python --version
41+
42+
# alternatively
43+
44+
python3 --version
45+
```
46+
47+
1. Make sure your have a compatible version of `node` installed (As of September, 2022, `v16.x` is recommended).
48+
49+
```sh
50+
node -v
51+
```
52+
53+
1. Run `npm ci` (NOT `npm install`, we don't want unnecessary updates on `package.lock`).
54+
55+
```sh
56+
npm ci
57+
```
58+
59+
1. Call Webpack to build the bundles and check the code. `npm run dev` will run Webpack with watch mode to continuously update the bundles on file changed.
60+
61+
```sh
62+
npm run dev
63+
```
64+
65+
1. If you've added code that should be tested, add tests. You can use watch mode that continuously tests changed files to make your life easier.
66+
67+
```sh
68+
npm run watch-jest
69+
```
70+
71+
1. If you've made any changes to the usage of this boilerplate, or file structure, etc, update the documentation.
72+
73+
1. Ensure the test suite passes via `npm test`.
74+
75+
1. Ensure the app package can be built successfully with no issues via the following commands:
76+
77+
```sh-session
78+
$ npm run prod
79+
$ npm run build:win
80+
$ npm run build:mac
81+
```
82+
83+
#### Changelog entries
84+
85+
All changes that add a feature to or fix a bug in the boilerplate require a changelog entry containing the description of the change, and the number of and link to the pull request. Try to match the structure of the existing entries.
86+
87+
You can add or edit the changelog entry in the GitHub web interface once you have opened the pull request and know the number and link to it.
88+
89+
If you have changed / updated / removed any package dependency, a changelog entry is then require. Please make sure to alphabetically order your entry based on the package name.
90+
91+
## Bugs
92+
93+
### Where to Find Known Issues
94+
95+
We will be using GitHub Issues for bugs. We will keep a close eye on this and try to make it clear when we have a fix in progress. Some notable/potential issues are also mentioned on [README](README.md). Before filling a new issue, try to make sure your problem doesn't already exist.
96+
97+
### Reporting New Issues
98+
99+
The best way to get your bug fixed is to provide a reproducible test case. Please provide a public repository with a runnable example alongside your issue.
100+
101+
## Code Conventions
102+
103+
- 2 spaces for indentation (no tabs).
104+
- 80 character line length is strongly preferred.
105+
- Prefer `'` over `"`.
106+
- ES6 syntax when possible.
107+
- Use [TypeScript](https://www.typescriptlang.org)
108+
- Avoid experimental APIs/features when possible.
109+
- Use semicolons;
110+
- Trailing commas,
111+
- Avd abbr wrds.
112+
113+
## License
114+
115+
By contributing to ERTW Boilerplate, you agree that yur contributions will be licensed under its [MIT license](LICENSE).

0 commit comments

Comments
 (0)