Skip to content

Commit

Permalink
Add CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
abinavseelan committed Jun 17, 2018
1 parent 7782ffd commit 690c451
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
80 changes: 80 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# React Input Trigger Contributing Guide

Before submitting your contribution, please take a moment and read through the following guidelines.

- [Pull Request Guidelines](#pull-request-guidelines)
- [Development Setup](#development-setup)
- [Project Structure](#project-structure)

## Pull Request Guidelines

- 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`.

- A preferred convention for branch names is `<task-type>/<description>`. For example:
- `bugfix/missing-props`
- `feature/handle-refs`

- As for commit guidelines on your branch, do not fret! 🙂 The commits will be squash merged by the maintainers before merging to `master`.

- Make sure `npm run lint` passes. This command runs [eslint](https://eslint.org/) to enforce the code-style conventions.

- Make sure `npm run test` passes. This will check if the package can be built correctly without build errors.

- 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.

- If adding a new feature:
- Describe your use-case / need for the feature, so that we can understand the scenario better.
- Preferably raise a suggestion issue, so that we can have a discussion before you start working on the PR. 👩‍💻

- If fixing a bug:
- Reference any open/closed github issues related to this bug.
- Provide detailed description of the bug in the PR. Live demo preferred. 🚀

## Development Setup

You will need [Node.js](http://nodejs.org) **version 6+**

After cloning the repo, run:

``` bash
$ npm install
```

**Note: If you're using `yarn`, just make sure you aren't committing the yarn lockfile.**

### Committing Changes

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.

### Commonly used NPM scripts

``` bash
# Runs the example project in `/src/docs`, using webpack-dev-server.
# Use this demo sandbox to test your changes. It has HMR out of the box!
$ npm start

# Check for linting issues.
# This command will also auto-fix some common issues.
$ npm run lint

# Tests if the package can be built correctly without errors.
$ npm test
```

## Project Structure

- **src**
- **index.js**: This is the main `<InputTrigger />` component source.
- **docs**: This is the code pertaining to the demo project.

- **build**

This contains the production builds of the component. **Do not edit this directly**

- **docs**

This is the production example for the component. **Do not edit this directly**

## Credits

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).
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ This prop takes a function that returns a function that you need to keep in your
>
```

### Contributing

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:

## Contributors

Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
Expand Down
2 changes: 2 additions & 0 deletions webpack.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ module.exports = merge.strategy({ entry: 'replace' })(commonConfiguration, {
devtool: 'cheap-eval-source-map', // transformed code (lines only),
devServer: {
contentBase: path.resolve(__dirname, 'docs'),
port: 3000,
hot: true,
open: true,
},
output: {
path: path.resolve(__dirname, 'docs'),
Expand Down

0 comments on commit 690c451

Please sign in to comment.