We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
We use github to host code, to track issues and feature requests, as well as accept pull requests.
We Use Github Flow, So All Code Changes Happen Through Pull Requests
Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests:
- Fork the repo and create your branch from
main. - If you've added code that should be tested, add tests.
- If you've changed APIs, update the documentation.
- Ensure the test suite passes.
- Make sure your code lints.
- Issue that pull request!
In short, when you submit code changes, your submissions are understood to be under the same BSD 3-Clause License that covers the project. Feel free to contact the maintainers if that's a concern.
Report bugs using Github's issues
We use GitHub issues to track public bugs. Report a bug by opening a new issue; it's that easy!
Great Bug Reports tend to have:
- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can.
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
To set up for local development:
-
Fork the repository and clone your fork:
git clone https://github.com/your-username/RetroUI.git cd RetroUI -
Install dependencies:
npm install
-
Start the Storybook development environment:
npm run dev
This will launch Storybook at http://localhost:6006, where you can preview and interact with all components.
-
Make your changes to components in the
/src/componentsdirectory.- Components will automatically update in Storybook as you save changes
- Use the watch mode for continuous builds during development:
npm run watch
-
Test your changes:
npm test -
Build the library to verify your changes work in the final bundle:
npm run build
-
To test your changes in another project:
# In your RetroUI directory npm link # In your test project directory npm link pixel-retroui
/src/components/- All UI components with their styles, tests and stories/src/styles/- Global styles and theme variables/.storybook/- Storybook configuration files/dist/- Built package (generated when you runnpm run build)/fonts/- Font files used by the library/bin/- Installation scripts
- 2 spaces for indentation rather than tabs
- Follow the project's TypeScript coding conventions
The project includes several useful npm scripts:
npm run dev- Start Storybook development environmentnpm run build- Build the library for productionnpm test- Run the test suitenpm run watch- Watch mode for development (continuously rebuilds on changes)
Before submitting a pull request, make sure to run the test suite:
npm testThis will run all the tests and ensure that your changes haven't introduced any regressions.
By contributing, you agree that your contributions will be licensed under its BSD 3-Clause License.