Thank you for your interest in contributing to the TopLocs Plugin SDK! We welcome contributions from the community and are grateful for any help you can provide.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Submitting Changes
- Coding Standards
- Testing
- Documentation
By participating in this project, you agree to abide by our Code of Conduct. Please treat all contributors with respect and create a welcoming environment for everyone.
- Fork the repository on GitHub
- Clone your fork locally
- Create a branch for your changes
- Make your changes and test them
- Submit a pull request
- Node.js 18+
- pnpm (preferred) or npm
- Git
# Clone your fork
git clone git@github.com:YOUR_USERNAME/plugin-sdk.git
cd plugin-sdk
# Add upstream remote
git remote add upstream git@github.com:toplocs/plugin-sdk.git
# Install dependencies
pnpm install
# Build the SDK
pnpm build
# Run development mode
pnpm devUse descriptive branch names:
feat/add-new-componentfix/resolve-typescript-errordocs/update-readmechore/upgrade-dependencies
-
Pull latest changes
git checkout main git pull upstream main
-
Create a feature branch
git checkout -b feat/your-feature-name
-
Make your changes
- Write clean, documented code
- Follow the existing code style
- Add tests if applicable
-
Test your changes
pnpm build pnpm test
Follow the Conventional Commits specification:
feat: add new plugin component loader
fix: resolve TypeScript import errors
docs: update API documentation
chore: upgrade Vue to latest version
-
Update your branch
git fetch upstream git rebase upstream/main
-
Push to your fork
git push origin feat/your-feature-name
-
Create a Pull Request
- Use a clear title and description
- Reference any related issues
- Include screenshots for UI changes
- Ensure all checks pass
## Description
Brief description of the changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Unit tests pass
- [ ] Manual testing completed
- [ ] Documentation updated
## Screenshots (if applicable)
Add screenshots here
## Related Issues
Fixes #123- Use TypeScript for all new code
- Provide proper type definitions
- Avoid
anytypes - Export types from
types.ts
- Use Vue 3 Composition API
- Follow single-file component structure
- Use
<script setup>syntax - Properly type props and emits
// Good
export interface PluginConfig {
id: string;
name: string;
slots: PluginSlot[];
}
// Bad
export interface pluginConfig {
id: any
name: any
slots: Array<any>
}src/
├── components/ # Vue components
├── types.ts # TypeScript definitions
├── utils/ # Utility functions
└── index.ts # Main exports
# Run all tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run type checking
pnpm type-check- Test files should be named
*.spec.ts - Cover edge cases
- Test both success and error scenarios
- Mock external dependencies
- Add JSDoc comments for public APIs
- Document complex logic
- Include usage examples
/**
* Creates a plugin development environment
* @param config - Plugin development configuration
* @returns Configured Vue application instance
* @example
* const app = createPluginDevelopmentEnvironment({
* pluginConfig: myConfig,
* components: { MyComponent }
* });
*/
export function createPluginDevelopmentEnvironment(
config: PluginDevConfig
): App<Element> {
// Implementation
}Update the README when:
- Adding new features
- Changing APIs
- Adding configuration options
- Fixing common issues
We especially welcome contributions in these areas:
- TypeScript improvements: Better type definitions
- Documentation: Examples, guides, API docs
- Testing: Unit tests, integration tests
- Performance: Bundle size optimization
- Features: New development tools
- Bug fixes: Issue resolution
- Open an issue for bugs
- Start a discussion for features
- Join our community chat
- Tag maintainers for urgent issues
Contributors will be:
- Listed in our Contributors section
- Mentioned in release notes
- Given credit in commit messages
Thank you for contributing to TopLocs Plugin SDK!