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
yarn
to 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.
- Make sure your code lints by running
yarn lint
.
You can test new features or debug an issue by the way that I'm using.
- Run
yarn link-pkg
to link the package into the app directory. - Run
yarn start
to create anESM
build and type definition file byrollup
watch mode. - Access the app directory.
- In the app directory, run
yarn link-pkg
to link with the package then runyarn start
to start development. - Try something cool via the demo app.
There're several useful scripts that you can use during the development:
yarn link-pkg
links the package into the app directory. You can develop or debug it via the demo app.yarn start
creates adist
folder with anESM
build and type definition file byrollup
watch mode.yarn lint:code
lints all.js
and.tsx?
files.yarn lint:type
runs the TypeScript type-checks.yarn lint:format
formats all files except the file list of.prettierignore
.yarn lint
lintscode
,type
, andformat
.yarn test
runs the complete test suite.yarn test:watch
runs an interactive test watcher (helpful in development).yarn test:cov
runs the complete test suite with coverage report.yarn test:update
updates the Jest snapshots.yarn build:dev
creates adist
folder with anESM
build and type definition file for development.yarn build:prod
creates adist
folder with package builds (CJS
&ESM
) and type definition file. You can test the package locally via yarn link.yarn clean:dist
deletes thedist
build folder.yarn clean:size
deletes the.size-snapshot.json
file.yarn clean:cov
deletes thecoverage
report folder.yarn clean
deletes build, test, and size relevant files.
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 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 IMG, you agree that your contributions will be licensed under its MIT license.