Thank you for your interest in contributing to Svelte MiniApps! This project aims to provide a collection of beautifully crafted tools built with Svelte 5, TypeScript, and TailwindCSS.
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/Svelte-MiniApps.git
- Install dependencies:
npm install
- Create a new branch for your contribution:
git checkout -b feature/your-feature-name
- Copy
.env.example
to.env
and fill in required values - Make sure you have the following installed:
- Node.js 18+
- npm or bun
- A modern web browser
# Development mode
npm run dev
# Build
npm run build
# Preview production build
npm run preview
src/
├── lib/ # Shared components and utilities
├── routes/ # SvelteKit routes and pages
├── app.html # Main HTML template
├── app.css # Global styles
└── app.d.ts # TypeScript declarations
- We use Prettier and ESLint for code formatting
- Run
npm run format
before committing - Run
npm run lint
to check for issues
- Place reusable components in
src/lib/components/
- Follow the established component structure:
<script lang="ts">
// Props first
let { prop = $props() } = $props();
// State
let someState = $state();
// Effects last
$effect(() => {
// ...
});
</script>
<div>
<!-- Template -->
</div>
<style>
/* Component styles */
</style>
- Use conventional commits format:
feat:
New featuresfix:
Bug fixesdocs:
Documentation changesstyle:
Code style changesrefactor:
Code refactoringtest:
Adding or modifying testschore:
Maintenance tasks
- Create pull requests against the
main
branch - Include a clear description of changes
- Reference any related issues
- Ensure all tests pass
- Keep PRs focused on a single concern
- Use the GitHub issues template
- Include steps to reproduce
- Include browser/environment information
- Add screenshots if relevant
- Check existing issues first
- Use the feature request template
- Explain the use case
- Provide example usage if possible
This project uses Svelte 5 with runes. Key things to remember:
- Use
$state()
for reactive state - Use
$props()
for component props - Use
$effect()
for side effects - Use
$derived()
for computed values - Follow the Svelte 5 docs for best practices
- Create a discussion on GitHub
- Read the documentation
By contributing, you agree that your contributions will be licensed under the project's MIT License.