# How to Contribute SVGR is a small project, it is widely used but has not a lot of contributors. We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and answers some questions that you may have. ## [Code of Conduct](https://github.com/gregberge/svgr/blob/master/CODE_OF_CONDUCT.md) We expect project participants to adhere to our Code of Conduct. Please read [the full text](https://github.com/gregberge/svgr/blob/master/CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated. ## Open Development All work on SVGR happens directly on [GitHub](/). Both core team members and external contributors send pull requests which go through the same review process. The SVGR repo is a monorepo using pnpm workspaces and [Lerna](https://lerna.js.org/docs/recipes/using-pnpm-with-lerna). The package manager used to install and link dependencies must be [pnpm](https://pnpm.io/). Note that website still uses npm, as there are some errors reported when using pnpm in gatsby. ### Online one click Setup You can use Gitpod(An Online Open Source VS Code like IDE which is free for Open Source) for contributing online. With a single click it will start a workspace and automatically: - clone the `svgr` repo. - install dependencies in '/': `pnpm install` - install dependencies in '/website': `npm install` - run `pnpm run dev` in `/`. - run `npm run dev` in `/website` to start the dev server. [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/) ### Workflow and Pull Requests _Before_ submitting a pull request, please make sure the following is done… 1. Fork the repo and create your branch from `main`. A guide on how to fork a repository: https://help.github.com/articles/fork-a-repo/ Open terminal (e.g. Terminal, iTerm, Git Bash or Git Shell) and type: ```sh-session $ git clone https://github.com//svgr $ cd svgr $ git checkout -b my_branch ``` Note: Replace `` with your GitHub username 2. Run `pnpm install` and `pnpm run build`. 3. If you've added code that should be tested, add tests. You can use watch mode that continuously transforms changed files to make your life easier. ```sh # in the background pnpm run dev ``` 4. If you've changed APIs, update the documentation. 5. Ensure the linting is good via `npm run lint`. ```sh-session $ pnpm run lint ``` 6. Ensure the test suite passes via `npm run test`. ```sh-session $ pnpm run test ``` ## Bugs ### Where to Find Known Issues We will be using GitHub Issues for our public bugs. We will keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new issue, try to make sure your problem doesn't already exist. ### Reporting New Issues The best way to get your bug fixed is to provide a reduced test case. Please provide a public repository with a runnable example. ## Code Conventions Please follow the `.prettierrc` in the project. ## Credits This project exists thanks to all the people who [contribute](CONTRIBUTING.md). ### [Backers](https://opencollective.com/svgr#backer) Thank you to all our backers! 🙏 ### [Sponsors](https://opencollective.com/svgr#sponsor) Support this project by becoming a sponsor. Your logo will show up here with a link to your website. ## License By contributing to SVGR, you agree that your contributions will be licensed under its MIT license.