a standard.site publication renderer for SvelteKit.
at main 203 lines 4.8 kB view raw view rendered
1# Contributing to svelte-standard-site 2 3Thank you for your interest in contributing! This document provides guidelines and information for contributors. 4 5## Getting Started 6 7### Prerequisites 8 9- Node.js 18 or higher 10- pnpm 8 or higher 11 12### Setup 13 141. Fork and clone the repository: 15 16```bash 17git clone https://github.com/ewanc26/svelte-standard-site.git 18cd svelte-standard-site 19``` 20 212. Install dependencies: 22 23```bash 24pnpm install 25``` 26 273. Create a `.env` file: 28 29```bash 30cp .env.example .env 31# Edit .env and add your PUBLIC_ATPROTO_DID 32``` 33 344. Start the development server: 35 36```bash 37pnpm dev 38``` 39 40## Development Workflow 41 42### Project Structure 43 44``` 45src/ 46├── lib/ # Library source code 47│ ├── client.ts # Main client implementation 48│ ├── types.ts # TypeScript type definitions 49│ ├── index.ts # Public API exports 50│ ├── components/ # Reusable Svelte components 51│ │ ├── PublicationCard.svelte 52│ │ └── DocumentCard.svelte 53│ ├── config/ # Configuration utilities 54│ │ └── env.ts # Environment variable handling 55│ └── utils/ # Utility functions 56│ ├── agents.ts # AT Protocol agent utilities 57│ ├── at-uri.ts # AT URI parsing utilities 58│ └── cache.ts # Caching implementation 59└── routes/ # Demo/showcase pages 60 ├── +page.svelte 61 └── +page.server.ts 62``` 63 64### Commands 65 66- `pnpm dev` - Start development server 67- `pnpm build` - Build the library 68- `pnpm check` - Run type checking 69- `pnpm format` - Format code with Prettier 70- `pnpm lint` - Check code formatting 71- `pnpm prepack` - Prepare package for publishing 72 73## Making Changes 74 75### Code Style 76 77- We use Prettier for code formatting 78- Run `pnpm format` before committing 79- TypeScript strict mode is enabled 80- Follow the existing code structure and patterns 81 82### Commit Messages 83 84We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification: 85 86- `feat:` - New features 87- `fix:` - Bug fixes 88- `docs:` - Documentation changes 89- `style:` - Code style changes (formatting, etc.) 90- `refactor:` - Code refactoring 91- `test:` - Test additions or changes 92- `chore:` - Build process or tooling changes 93 94Example: 95 96``` 97feat: add support for custom PDS endpoints 98fix: resolve caching issue with blob URLs 99docs: update README with new examples 100``` 101 102### Pull Request Process 103 1041. Create a new branch: 105 106```bash 107git checkout -b feat/your-feature-name 108``` 109 1102. Make your changes and commit them: 111 112```bash 113git add . 114git commit -m "feat: add your feature" 115``` 116 1173. Push to your fork: 118 119```bash 120git push origin feat/your-feature-name 121``` 122 1234. Open a Pull Request on GitHub 124 1255. Ensure: 126 - Code passes type checking (`pnpm check`) 127 - Code is properly formatted (`pnpm format`) 128 - Documentation is updated if needed 129 - Examples are added for new features 130 131## What to Contribute 132 133### Good First Issues 134 135Look for issues labeled `good first issue` for beginner-friendly tasks. 136 137### Areas for Contribution 138 139- **Bug Fixes**: Report and fix bugs 140- **Features**: Implement new features (discuss in an issue first) 141- **Documentation**: Improve or expand documentation 142- **Examples**: Add new usage examples 143- **Components**: Create new reusable components 144- **Tests**: Add or improve test coverage 145- **Performance**: Optimize existing code 146 147## Reporting Bugs 148 149When reporting bugs, please include: 150 1511. A clear description of the issue 1522. Steps to reproduce 1533. Expected behavior 1544. Actual behavior 1555. Environment details (Node version, OS, etc.) 1566. Code samples if applicable 157 158## Feature Requests 159 160For feature requests: 161 1621. Check if the feature already exists or is planned 1632. Open an issue describing: 164 - The problem you're trying to solve 165 - Your proposed solution 166 - Any alternatives you've considered 167 - Examples of the desired behavior 168 169## Code of Conduct 170 171### Our Pledge 172 173We are committed to providing a friendly, safe, and welcoming environment for all contributors. 174 175### Expected Behavior 176 177- Be respectful and inclusive 178- Welcome newcomers 179- Accept constructive criticism gracefully 180- Focus on what's best for the community 181- Show empathy towards others 182 183### Unacceptable Behavior 184 185- Harassment of any kind 186- Discriminatory language or actions 187- Personal attacks 188- Publishing others' private information 189- Other conduct which could reasonably be considered inappropriate 190 191## Questions? 192 193Feel free to: 194 195- Open an issue for questions 196- Start a discussion in GitHub Discussions 197- Reach out to maintainers 198 199## License 200 201By contributing, you agree that your contributions will be licensed under the [AGPL-3.0](./LICENSE). 202 203Thank you for contributing to svelte-standard-site! 🎉