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 related documents with details of changes to the interface.
- Update related examples if needed.
- Make sure your code lints by running
yarn lint. - Run
yarn changesetto add a changeset.
You can test new features or debug an issue by the way that I'm using.
- Run
yarn link-pkgto link the package into the app directory. - Run
yarn startto createESMbuilds and type definition file byrollupwatch mode. - Access the app directory.
- In the app directory, run
yarn link-pkgto link with the package then runyarn start:devto start development. - Try something cool via the playground.
There're several useful commands that you can use during the development:
yarn link-pkglinks the package into the app directory. You can develop or debug it via the playground.yarn startcreates adistfolder withESMbuilds and type definition file byrollupwatch mode. You can test the package locally viayarn link-pkgor yarn link.yarn buildcreates adistfolder with package builds (CJS,ESM, andUMD) and type definition file. You can test the package locally viayarn link-pkgor yarn link.yarn changesetadds a changeset.yarn lint:codelints all.jsand.tsx?files.yarn lint:typeruns the TypeScript type-checks.yarn lint:formatformats all files except the file list of.prettierignore.yarn lintlintscode,type, andformat.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 sizechecks the bundle size of each format.yarn clean:builddeletes thedistbuild folder.yarn clean:size: deletes the.size-snapshot.jsonfile.yarn clean:covdeletes thecoveragereport folder.yarn cleandeletes the build, coverage, and size snapshot.
We use ESLint, StyleLint and Prettier for code style and formatting. Run yarn lint after making any changes to the code. Then, our linter will catch most issues that might 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 Virtual, you agree that your contributions will be licensed under its MIT license.