Contributing

Contributions are welcome! If you're looking to contribute to svelte-french-toast, this guide will help you get your development environment set up.

Development Setup

  1. Clone the repository:

    bash git clone https://github.com/kbrgl/svelte-french-toast.git cd svelte-french-toast

  2. Install dependencies:

    This project uses pnpm as its package manager. You can install it via npm install -g pnpm.

    bash pnpm install

Running the Development Server

To run the local development server, which includes the documentation and example site, use the dev script:

pnpm dev

This will start a Vite server, typically on http://localhost:5173.

Scripts

This project comes with several scripts to help with development, defined in package.json.

  • pnpm format: Formats all files using Prettier.
  • pnpm lint: Lints the codebase using ESLint and checks formatting with Prettier.
  • pnpm check: Runs svelte-check to perform type-checking on Svelte components.
  • pnpm test: Runs end-to-end tests using Playwright.
  • pnpm test:unit: Runs unit tests using Vitest.
  • pnpm build: Builds the library for production.
  • pnpm package: Creates the final distributable package in the /package directory.

Submitting a Pull Request

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes.
  4. Ensure all checks pass by running pnpm lint and pnpm test.
  5. Push your changes to your fork and open a pull request.