Skip to content

Commit 690c451

Browse files
committed
Add CONTRIBUTING.md
1 parent 7782ffd commit 690c451

File tree

3 files changed

+86
-0
lines changed

3 files changed

+86
-0
lines changed

CONTRIBUTING.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# React Input Trigger Contributing Guide
2+
3+
Before submitting your contribution, please take a moment and read through the following guidelines.
4+
5+
- [Pull Request Guidelines](#pull-request-guidelines)
6+
- [Development Setup](#development-setup)
7+
- [Project Structure](#project-structure)
8+
9+
## Pull Request Guidelines
10+
11+
- All development would require you to just edit the contents of `src`. Please do not modify the contents of `/build`, or `/docs` directly. `/build` will always be generated by the maintainers before publishing to npm, and `/docs` is generated automatically on publish from `/src/docs`.
12+
13+
- A preferred convention for branch names is `<task-type>/<description>`. For example:
14+
- `bugfix/missing-props`
15+
- `feature/handle-refs`
16+
17+
- As for commit guidelines on your branch, do not fret! 🙂 The commits will be squash merged by the maintainers before merging to `master`.
18+
19+
- Make sure `npm run lint` passes. This command runs [eslint](https://eslint.org/) to enforce the code-style conventions.
20+
21+
- Make sure `npm run test` passes. This will check if the package can be built correctly without build errors.
22+
23+
- If there are any changes to the dependencies, please make sure to use `npm` rather than `yarn` and that your changes are reflected in both the `package.json` and `package-lock.json` files.
24+
25+
- If adding a new feature:
26+
- Describe your use-case / need for the feature, so that we can understand the scenario better.
27+
- Preferably raise a suggestion issue, so that we can have a discussion before you start working on the PR. 👩‍💻
28+
29+
- If fixing a bug:
30+
- Reference any open/closed github issues related to this bug.
31+
- Provide detailed description of the bug in the PR. Live demo preferred. 🚀
32+
33+
## Development Setup
34+
35+
You will need [Node.js](http://nodejs.org) **version 6+**
36+
37+
After cloning the repo, run:
38+
39+
``` bash
40+
$ npm install
41+
```
42+
43+
**Note: If you're using `yarn`, just make sure you aren't committing the yarn lockfile.**
44+
45+
### Committing Changes
46+
47+
There is a `pre-commit` hook that runs the linter to check for code style. Please make sure that any issues that come up during this linter check are fixed when raising the Pull Request.
48+
49+
### Commonly used NPM scripts
50+
51+
``` bash
52+
# Runs the example project in `/src/docs`, using webpack-dev-server.
53+
# Use this demo sandbox to test your changes. It has HMR out of the box!
54+
$ npm start
55+
56+
# Check for linting issues.
57+
# This command will also auto-fix some common issues.
58+
$ npm run lint
59+
60+
# Tests if the package can be built correctly without errors.
61+
$ npm test
62+
```
63+
64+
## Project Structure
65+
66+
- **src**
67+
- **index.js**: This is the main `<InputTrigger />` component source.
68+
- **docs**: This is the code pertaining to the demo project.
69+
70+
- **build**
71+
72+
This contains the production builds of the component. **Do not edit this directly**
73+
74+
- **docs**
75+
76+
This is the production example for the component. **Do not edit this directly**
77+
78+
## Credits
79+
80+
This file has been adapted from the awesome folks at Vuejs: [VueJS's Contributing Guidelines](https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md).

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ This prop takes a function that returns a function that you need to keep in your
174174
>
175175
```
176176

177+
### Contributing
178+
179+
Want to fix something, add a new feature or raise an issue? Please read the [contributing guide](https://github.com/abinavseelan/react-input-trigger/blob/master/CONTRIBUTING.md) to get started. :smile:
180+
177181
## Contributors
178182

179183
Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):

webpack.dev.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ module.exports = merge.strategy({ entry: 'replace' })(commonConfiguration, {
1111
devtool: 'cheap-eval-source-map', // transformed code (lines only),
1212
devServer: {
1313
contentBase: path.resolve(__dirname, 'docs'),
14+
port: 3000,
1415
hot: true,
16+
open: true,
1517
},
1618
output: {
1719
path: path.resolve(__dirname, 'docs'),

0 commit comments

Comments
 (0)