From a09c7b5fc33899dfc9f50f9f5757d9039aec5891 Mon Sep 17 00:00:00 2001 From: bluwy Date: Sun, 12 Dec 2021 23:47:26 +0800 Subject: [PATCH 1/2] docs: add note on testing vite locally --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 744a4d940224..2e0022e5a19e 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ git config core.hookspath .githooks ### Coding style There are a few guidelines we follow: + - Internal variables are written with `snake_case` while external APIs are written with `camelCase` - Provide a single object as the argument to public APIs. This object can have multiple properties - Avoid creating new test projects under `packages/kit/test/apps` but reuse an existing one when possible @@ -88,6 +89,22 @@ You can run the test server with `cd packages/kit/test/apps/basics; pnpm run dev You may need to install some dependencies first, e.g. with `npx playwright install-deps` (which only works on Ubuntu). +To test Vite locally, add the below code into the root `package.json` and run `pnpm install` to link the local Vite package. + +```jsonc +{ + // ... + "dependencies": { + "vite": "^2.7.1" + }, + "pnpm": { + "overrides": { + "vite": "link:../path/to/vite/packages/vite" + } + } +} +``` + ### Documentation All documentation for SvelteKit is in the `documentation` directory, and any improvements should be made as a Pull Request to this repository. The documentation is served via an API; the site itself is located in the [`sites` repository](https://github.com/sveltejs/sites). @@ -109,6 +126,7 @@ npm publish --access=public ## Code structure Entry points to be aware of are: + - [`packages/create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte) - code that's run when you create a new project with `npm init svelte@next` - [`packages/kit/src/packaging`](https://github.com/sveltejs/kit/tree/master/packages/kit/src/packaging) - for the `svelte-kit package` command - [`packages/kit/src/core/dev/index.js`](https://github.com/sveltejs/kit/blob/master/packages/kit/src/core/dev/index.js) - for the dev-mode server From 5cef4f40dc1ceb93376584140c920b016d40c1ff Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Sun, 12 Dec 2021 10:00:29 -0800 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e0022e5a19e..f4085d6948e5 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ To test Vite locally, add the below code into the root `package.json` and run `p { // ... "dependencies": { - "vite": "^2.7.1" + "vite": "^2.0.0" }, "pnpm": { "overrides": {