When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
Working on your first Pull Request? You can learn how from this free video series.
- Fork the repository and create your branch from
master. - Run
yarnto install dependencies. - If you’ve fixed a bug or added code that should be tested.
- Ensure the test suite passes by running
yarn test. - Update the README.md with details of changes to the interface.
- Update the demo app if needed.
- Format your code with Prettier.
- Make sure your code lints by running
yarn lint. - Make sure your code passes type check by running
yarn type-check.
After cloning React Cool Dimensions, run yarn to fetch its dependencies. Then, you can run several commands:
yarn devruns the demo app as your playground atlocalhost:10001. Support live reloading.yarn lint:codelints all.jsand.tsx?files.yarn lint:stylelints all.cssand.tsx?(for Emotion) files.yarn lintlints bothcodeandstyle.yarn type-checkruns the Typescript typechecks.yarn type-check:watchruns an interactive typechecks watcher (helpful in development).yarn testruns the complete test suite.yarn test:watchruns an interactive test watcher (helpful in development).yarn test:covruns the complete test suite with coverage report.yarn build:democreates apublicfolder with all the static files.yarn build:distcreates adistfolder with package builds (CJS&ESM) and type definition file. You can test the package locally via yarn link.yarn buildcreates bothpublicanddist.yarn clean:devdeletes thedemo/.devbuild folder.yarn clean:demodeletes thepublicbuild folder.yarn clean:distdeletes thedistbuild folder.yarn clean:covdeletes thecoveragereport folder.yarn cleandeletes all the build/coverage folders.
We use an automatic code formatter called Prettier. Run yarn lint after making any changes to the code. Then, our linter will catch most issues that may exist in your code.
However, there are still some styles that the linter cannot pick up. If you are unsure about something, looking at Airbnb’s Style Guide will guide you in the right direction.
By contributing to React Cool Dimensions, you agree that your contributions will be licensed under its MIT license.