Skip to content

Commit 85f5d96

Browse files
authored
chore: update readme to explain scripts (#1177)
* chore: update readme to explain scripts and add a way to focus e2e tests froms * add line and note for playwright browser installation
1 parent 6abf2c6 commit 85f5d96

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,22 @@ Join the [Svelte Discord server](https://svelte.dev/chat)!
4747

4848
## Development
4949

50-
- Run `pnpm i` to install dependencies
51-
- Run `pnpm dev` in `packages/vite-plugin-svelte` to autobuild plugin
52-
- Run `pnpm dev` in `packages/playground/xxx` to start a Vite app
53-
54-
Note that changes in the plugin needs restart of the Vite dev server.
50+
All scripts work from monorepo-root.
51+
The plugins are unbundled esm, a build step is not required while developing locally, but restarting local dev-servers can be needed to apply changes.
52+
53+
- `pnpm i` to install dependencies
54+
- `pnpm playwright install chromium` to install required playwright browser binaries via local playwright-core
55+
56+
> **NOTE**
57+
> This repo uses `playwright-core` with a bin alias to `playwright` via package.json script
58+
> Calling `pnpm dlx playwright install chromium` will not work.
59+
60+
- `pnpm check` and `pnpm:test` to validate changes
61+
- `pnpm format` to format source code
62+
- `pnpm test:unit`, `pnpm test:serve` or `pnpm test:build` to run a subset of tests
63+
- `pnpm test <e2e-directory-name>` to focus a specific testsuite
64+
- `pnpm changeset` to generate a changeset
65+
- `pnpm generate:types` to generate public types from jsdoc (this is required when changing types and validated in ci)
5566

5667
## Credits
5768

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": true,
44
"type": "module",
55
"scripts": {
6-
"test": "run-s -c test:unit test:build test:serve",
6+
"test": "run-s -c test:unit \"test:build {@}\" \"test:serve {@}\" --",
77
"test:unit": "vitest run",
88
"test:serve": "vitest run -c vitest.config.e2e.ts",
99
"test:build": "cross-env TEST_BUILD=1 vitest run -c vitest.config.e2e.ts",

0 commit comments

Comments
 (0)