Skip to content

Commit 26b6b5f

Browse files
authored
[docs] reorganize contributors guide (sveltejs#3029)
1 parent 6221e6a commit 26b6b5f

File tree

1 file changed

+31
-27
lines changed

1 file changed

+31
-27
lines changed

README.md

+31-27
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SvelteKit is still in beta. Expect bugs! Read more [here](https://svelte.dev/blo
66

77
Please see [the documentation](https://kit.svelte.dev/docs) for information about getting started and developing with SvelteKit.
88

9-
## Packages
9+
### Packages
1010

1111
| Package | Changelog |
1212
| --------------------------------------------------------------------------- | ------------------------------------------------------------- |
@@ -32,6 +32,8 @@ If Vite causes an issue, please report in the [Vite issue tracker](https://githu
3232

3333
## Developing
3434

35+
### Building and Running
36+
3537
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:
3638

3739
```bash
@@ -62,18 +64,16 @@ To use the git hooks in the repo, which will save you waiting for CI to tell you
6264
git config core.hookspath .githooks
6365
```
6466

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
7368

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
7575

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.
7777

7878
### Testing
7979

@@ -89,7 +89,9 @@ You can run the test server with `cd packages/kit/test/apps/basics; pnpm run dev
8989

9090
You may need to install some dependencies first, e.g. with `npx playwright install-deps` (which only works on Ubuntu).
9191

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`:
9395

9496
```jsonc
9597
{
@@ -105,13 +107,27 @@ To test Vite locally, add the below code into the root `package.json` and run `p
105107
}
106108
```
107109

108-
### Documentation
110+
### Documentation changes
109111

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).
111113

112114
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).
113115

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
115131

116132
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.
117133

@@ -122,15 +138,3 @@ New packages will need to be published manually the first time if they are scope
122138
```bash
123139
npm publish --access=public
124140
```
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

Comments
 (0)