From 8c6d4be94a9b0ad034de4de0c035e6f99b28832c Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Tue, 30 Apr 2024 15:57:46 +0800 Subject: [PATCH] chore: update `CONTRIBUTING.md` (#16465) Co-authored-by: Bjorn Lu --- CONTRIBUTING.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4a7e364a42be68..f624e76897e578 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,6 +31,14 @@ To make this file used by `git blame`, you need to run the following command. git config --local blame.ignoreRevsFile .git-blame-ignore-revs ``` +## Documentation + +To develop the `docs/` site: + +1. Run `pnpm run build` in Vite's root folder. This will generate the types for `twoslash` to work in the code examples. If the types are not available, errors will be logged in step 2 but does not prevent the site from working. + +2. Run `pnpm run docs` in Vite's root folder. + ## Debugging To use breakpoints and explore code execution, you can use the ["Run and Debug"](https://code.visualstudio.com/docs/editor/debugging) feature from VS Code. @@ -166,7 +174,7 @@ For a mock dependency, make sure you add a `@vitejs/test-` prefix to the package ## Debug Logging -You can set the `DEBUG` environment variable to turn on debugging logs (e.g. `DEBUG="vite:resolve"`). To see all debug logs, you can set `DEBUG="vite:*"`, but be warned that it will be quite noisy. You can run `grep -r "createDebugger('vite:" packages/vite/src/` to see a list of available debug scopes. +You can set the `--debug` option to turn on debugging logs (e.g. `vite --debug resolve`). To see all debug logs, you can set `vite --debug *`, but be warned that it will be quite noisy. You can run `grep -r "createDebugger('vite:" packages/vite/src/` to see a list of available debug scopes. ## Pull Request Guidelines