How to contribute
Better SVG is an open-source project, and contributions are welcome! Whether you’re fixing bugs, adding features, or improving documentation, your help makes the extension better for everyone.Ways to contribute
Report bugs
Found a bug? Help us fix it:- Check existing issues to avoid duplicates
- Open a new issue with:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- VS Code version and extension version
- Screenshots or error messages if applicable
Suggest features
Have an idea for a new feature?- Check if it’s already been suggested in GitHub Issues
- Open a new issue with the “feature request” label
- Describe the feature and why it would be useful
- Include examples or mockups if possible
Submit code
Ready to contribute code? Here’s how:- Fork the repository at github.com/midudev/better-svg
- Clone your fork locally:
- Install dependencies:
- Create a branch for your changes:
- Make your changes and test thoroughly
- Build the extension:
- Test your changes in VS Code:
- Press
F5to open a new Extension Development Host window - Test your changes with various SVG files and scenarios
- Press
- Commit your changes with a clear message:
- Push to your fork:
- Open a Pull Request on GitHub
Development setup
Prerequisites
- Node.js (24.x or later)
- VS Code (1.85.0 or later)
- Git
Project structure
Available scripts
npm run compile- Build the extensionnpm run watch- Watch mode for developmentnpm run package- Build for productionnpm run test- Run testsnpm run lint- Lint TypeScript filesnpm run check-types- Type check without emitting
Testing
Make sure to test your changes with:- Various SVG files (simple and complex)
- Different framework files (
.jsx,.tsx,.vue,.svelte,.astro) - All configuration settings
- Edge cases (invalid SVGs, large files, etc.)
Code guidelines
TypeScript
- Use TypeScript for all new code
- Follow existing code style and conventions
- Run
npm run lintbefore committing - Ensure
npm run check-typespasses
Commit messages
Use clear, descriptive commit messages:Add: new feature descriptionFix: bug descriptionUpdate: what was updatedRefactor: what was refactoredDocs: documentation changes
Pull requests
When opening a pull request:- Provide a clear title and description
- Reference any related issues
- Include screenshots for UI changes
- Ensure all tests pass
- Keep changes focused (one feature/fix per PR)
Getting help
Need help with your contribution?- Check the README for basic information
- Review existing code and pull requests for examples
- Ask questions in your issue or pull request
- Contact the maintainer: [email protected]
Code of conduct
Be respectful and constructive in all interactions. This project is built by volunteers who care about making great tools for developers.License
By contributing to Better SVG, you agree that your contributions will be licensed under the Apache-2.0 license.Recognition
All contributors are valued! Meaningful contributions will be recognized in:- GitHub’s contributor list
- Release notes (for significant features/fixes)
- Project documentation