Skip to content

Latest commit

 

History

History
80 lines (50 loc) · 3 KB

CONTRIBUTING.md

File metadata and controls

80 lines (50 loc) · 3 KB

React Input Trigger Contributing Guide

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

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 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 version 6+

After cloning the repo, run:

$ 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

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