You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -32,6 +32,8 @@ If Vite causes an issue, please report in the [Vite issue tracker](https://githu
32
32
33
33
## Developing
34
34
35
+
### Building and Running
36
+
35
37
This is a monorepo, meaning the repo holds multiple packages. It requires the use of [pnpm](https://pnpm.js.org/en/). You can [install pnpm](https://pnpm.io/installation) with:
36
38
37
39
```bash
@@ -62,18 +64,16 @@ To use the git hooks in the repo, which will save you waiting for CI to tell you
62
64
git config core.hookspath .githooks
63
65
```
64
66
65
-
### Coding style
66
-
67
-
There are a few guidelines we follow:
68
-
69
-
- Internal variables are written with `snake_case` while external APIs are written with `camelCase`
70
-
- Provide a single object as the argument to public APIs. This object can have multiple properties
71
-
- Avoid creating new test projects under `packages/kit/test/apps` but reuse an existing one when possible
72
-
- Ensure `pnpm lint` and `pnpm check` pass. You can run `pnpm format` to format the code
67
+
### Code structure
73
68
74
-
### Generating changelogs
69
+
Entry points to be aware of are:
70
+
-[`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`
71
+
-[`packages/kit/src/packaging`](https://github.com/sveltejs/kit/tree/master/packages/kit/src/packaging) - for the `svelte-kit package` command
72
+
-[`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
73
+
-[`packages/kit/src/core/build/index.js`](https://github.com/sveltejs/kit/blob/master/packages/kit/src/core/build/index.js) - for the production server
74
+
-[`packages/adapter-[platform]`](https://github.com/sveltejs/kit/tree/master/packages) - for the various SvelteKit-provided adapters
75
75
76
-
For changes to be reflected in package changelogs, run `pnpx changeset`and follow the prompts. All changesets should be `patch` until SvelteKit 1.0
76
+
Most code called at build-time or from the CLI entry point lives in [packages/kit/src/core](https://github.com/sveltejs/kit/tree/master/packages/kit/src/core). Code that runs for rendering and routing lives in [packages/kit/src/runtime](https://github.com/sveltejs/kit/tree/master/packages/kit/src/runtime). Most changes to SvelteKit itself would involve code in these two directories.
77
77
78
78
### Testing
79
79
@@ -89,7 +89,9 @@ You can run the test server with `cd packages/kit/test/apps/basics; pnpm run dev
89
89
90
90
You may need to install some dependencies first, e.g. with `npx playwright install-deps` (which only works on Ubuntu).
91
91
92
-
To test Vite locally, add the below code into the root `package.json` and run `pnpm install` to link the local Vite package.
92
+
### Working on Vite and other dependencies
93
+
94
+
If you would like to test local changes to Vite or another dependency, you can build it and then use [`pnpm.overrides`](https://pnpm.io/package_json#pnpmoverrides). Please note that `pnpm.overrides` must be specified in the root `package.json` and you must first list the package as a dependency in the root `package.json`:
93
95
94
96
```jsonc
95
97
{
@@ -105,13 +107,27 @@ To test Vite locally, add the below code into the root `package.json` and run `p
105
107
}
106
108
```
107
109
108
-
### Documentation
110
+
### Documentation changes
109
111
110
-
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).
112
+
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](https://github.com/sveltejs/api.svelte.dev); the site itself is located in the [`sites` repository](https://github.com/sveltejs/sites).
111
113
112
114
If you wish to preview documentation changes locally, please follow the instructions here: [Previewing local docs changes](https://github.com/sveltejs/sites/blob/master/sites/kit.svelte.dev/README.md#previewing-local-docs-changes).
113
115
114
-
### Releases
116
+
### Sending PRs
117
+
118
+
#### Coding style
119
+
120
+
There are a few guidelines we follow:
121
+
- Internal variables are written with `snake_case` while external APIs are written with `camelCase`
122
+
- Provide a single object as the argument to public APIs. This object can have multiple properties
123
+
- Avoid creating new test projects under `packages/kit/test/apps` but reuse an existing one when possible
124
+
- Ensure `pnpm lint` and `pnpm check` pass. You can run `pnpm format` to format the code
125
+
126
+
#### Generating changelogs
127
+
128
+
For changes to be reflected in package changelogs, run `pnpx changeset` and follow the prompts. All changesets should be `patch` until SvelteKit 1.0
129
+
130
+
## Releases
115
131
116
132
The [Changesets GitHub action](https://github.com/changesets/action#with-publishing) will create and update a PR that applies changesets and publishes new versions of changed packages to npm.
117
133
@@ -122,15 +138,3 @@ New packages will need to be published manually the first time if they are scope
122
138
```bash
123
139
npm publish --access=public
124
140
```
125
-
126
-
## Code structure
127
-
128
-
Entry points to be aware of are:
129
-
130
-
-[`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`
131
-
-[`packages/kit/src/packaging`](https://github.com/sveltejs/kit/tree/master/packages/kit/src/packaging) - for the `svelte-kit package` command
132
-
-[`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
133
-
-[`packages/kit/src/core/build/index.js`](https://github.com/sveltejs/kit/blob/master/packages/kit/src/core/build/index.js) - for the production server
134
-
-[`packages/adapter-[platform]`](https://github.com/sveltejs/kit/tree/master/packages) - for the various SvelteKit-provided adapters
135
-
136
-
Most code called at build-time or from the CLI entry point lives in [packages/kit/src/core](https://github.com/sveltejs/kit/tree/master/packages/kit/src/core). Code that runs for rendering and routing lives in [packages/kit/src/runtime](https://github.com/sveltejs/kit/tree/master/packages/kit/src/runtime). Most changes to SvelteKit itself would involve code in these two directories.
0 commit comments