Contributing to svger-cli
November 7, 2025 ยท View on GitHub
Thank you for your interest in contributing to svger-cli! We welcome contributions from the community to help improve and grow this zero-dependency enterprise SVG processing framework. This document outlines the guidelines and processes for contributing.
Table of Contents
- Code of Conduct
- How to Contribute
- Development Setup
- Reporting Issues
- Submitting Pull Requests
- Code Style and Standards
- Testing
- Commit Guidelines
- License
Code of Conduct
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the maintainers.
How to Contribute
There are many ways to contribute to svger-cli:
- Report bugs and request features via GitHub Issues
- Improve documentation by fixing typos or adding examples
- Write code by submitting pull requests
- Review pull requests from other contributors
- Help others in discussions and issue threads
- Add framework support for new UI libraries
- Optimize performance and reduce bundle size
Development Setup
-
Fork and Clone: Fork the repository on GitHub and clone your fork locally.
git clone https://github.com/your-username/svger-cli.git cd svger-cli -
Install Dev Dependencies: Install TypeScript and development tools.
npm install -
Build the Project: Compile TypeScript to JavaScript.
npm run build -
Test the CLI: Run the built CLI to ensure it works.
node dist/cli.js --help
Reporting Issues
When reporting issues, please include:
- A clear and descriptive title
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Environment details (OS, Node.js version, etc.)
- Any relevant SVG files or error messages
- Framework you're targeting (React, Vue, etc.)
Use GitHub Issues for bug reports and feature requests.
Submitting Pull Requests
-
Create a Branch: Create a feature branch from
main.git checkout -b feature/your-feature-name -
Make Changes: Implement your changes, following the code style guidelines.
-
Test Manually: Since automated tests are not yet implemented, thoroughly test your changes manually.
-
Update Documentation: Update README.md or other docs if necessary.
-
Commit Changes: Use clear commit messages (see Commit Guidelines).
-
Push and Create PR: Push your branch and create a pull request on GitHub.
- Provide a clear description of the changes
- Reference any related issues
- Include before/after screenshots for UI changes
- Test with multiple frameworks if applicable
Code Style and Standards
- Language: TypeScript is the primary language
- Zero Dependencies: Maintain zero runtime dependencies - use only native Node.js APIs
- Modular Architecture: Follow the service-oriented architecture in
src/ - Naming: Use descriptive names for variables, functions, and classes
- Comments: Add JSDoc comments for public APIs
- Error Handling: Use the centralized error handler for consistent error management
- Performance: Optimize for speed and memory usage
Build and test your changes:
npm run build
node dist/cli.js [your-test-command]
Testing
Currently, the project relies on manual testing. Future contributions that add automated testing infrastructure are highly encouraged.
When testing:
- Test with various SVG files (simple and complex)
- Test all supported frameworks
- Test edge cases like malformed SVGs
- Verify performance doesn't regress
Commit Guidelines
- Use the imperative mood in commit messages (e.g., "Add feature" not "Added feature")
- Keep the first line under 50 characters
- Provide a detailed description in the body if needed
- Reference issue numbers when applicable (e.g., "Fix #123")
Example:
Add Vue.js framework support
- Implement Vue composition API template
- Add Vue-specific prop handling
- Update framework detection logic
Closes #456
License
By contributing to this project, you agree that your contributions will be licensed under the MIT License.