Before submitting your contribution, please take a moment and read through the following 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 thanyarn
and that your changes are reflected in both thepackage.json
andpackage-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. 🚀
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.
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.
# 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
-
src
- index.js: This is the main
<InputTrigger />
component source. - docs: This is the code pertaining to the demo project.
- index.js: This is the main
-
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
This file has been adapted from the awesome folks at Vuejs: VueJS's Contributing Guidelines.