From 58c612b746df4b0f489233c71e2aed3f2929acc8 Mon Sep 17 00:00:00 2001 From: Franco Romano Losada <68303277+francoromanol@users.noreply.github.com> Date: Wed, 22 Mar 2023 18:38:19 +0100 Subject: [PATCH] Add how to test changes section to CONTRIBUTING (#6581) * Update CONTRIBUTING.md * Add feedback to CONTRIBUTING.md --------- Co-authored-by: Nate Moore --- CONTRIBUTING.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3c0af74cbe..347fd2e6d9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -57,6 +57,22 @@ pnpm run dev pnpm run build ``` +**How can I test my changes while contributing to the repository?** + +During the development process, you may want to test your changes to ensure they are working as expected. Here are a few ways to do it: + +1. Run any of the examples in the `/examples` folder. They are linked to use the local Astro source code, so you can see the effects of your changes. + + ``` + pnpm --filter @example/minimal run dev + ``` + +2. Write a test and run it. This is useful if you're making a specific fix and want to see if your changes are working as expected. + +3. Create a separate project and use your local Astro through [`pnpm link`](https://pnpm.io/cli/link). This is helpful if you're making bigger changes and want to test them in a separate project. + +Overall, it's up to personal preference which method to use. For smaller changes, using the examples folder may be sufficient. For larger changes, using a separate project may be more appropriate. + #### Debugging Vite You can debug vite by prefixing any command with `DEBUG` like so: