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
* packages/create/scripts/update-template-repo.sh: use env
increases portability
* packages/create/package.json: do not call bash excessively
the script's shebang calls the shell already.
Right now a bash is called within a shell only to execute
the shebang, which in turn executes another shell.
* *: use `sh` instead of `bash` for simple commands
These commands are not bash specific and the docs
should reflect that.
Also some bytes are saved.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Please keep your pull requests focused to feature or issue. Focused smaller chan
16
16
## Preparing
17
17
This is a monorepo, meaning the repo holds multiple packages. It requires the use of [pnpm](https://pnpm.io/). You can [install pnpm](https://pnpm.io/installation) with:
18
18
19
-
```bash
19
+
```sh
20
20
npm i -g pnpm
21
21
```
22
22
@@ -25,27 +25,27 @@ Linux users, you will have to ensure 'sudo' is not required. See [docker post in
25
25
26
26
`pnpm` commands run in the project's root directory will run on all sub-projects. You can checkout the code and install the dependencies with:
27
27
28
-
```bash
28
+
```sh
29
29
cd cli
30
30
pnpm install
31
31
```
32
32
33
33
## Build and run
34
34
To build the project and all packages. Run the 'build' script:
35
35
36
-
```bash
36
+
```sh
37
37
# from root of project
38
38
pnpm build
39
39
```
40
40
This outputs into /packages/PACKAGE/dist/.
41
41
42
42
Run the 'cli' package:
43
-
```bash
43
+
```sh
44
44
pnpm sv
45
45
```
46
46
47
47
Run build with watch mode:
48
-
```bash
48
+
```sh
49
49
pnpm dev
50
50
```
51
51
@@ -54,29 +54,29 @@ pnpm dev
54
54
For each add-on we have integration tests setup. These install the deps, build the app, run the dev server and then run a few small snippets against the add-on to see if the changes introduced by the add-on are working as expected.
55
55
56
56
Run all tests:
57
-
```bash
57
+
```sh
58
58
# from root of project
59
59
pnpm test
60
60
```
61
61
62
62
Run tests with vitest ui:
63
-
```bash
63
+
```sh
64
64
# from root of project
65
65
pnpm test:ui
66
66
```
67
67
68
68
Run package specific tests by specifying a project flag to the package and running the test command. Eg:
69
-
```bash
69
+
```sh
70
70
pnpm test --project core # addons / create / migrate / etc.
71
71
```
72
72
73
73
To run a individual test. `cd` into the package. Run the local `test` script to that package, with a path arg to the individual piece you want tested. Eg:
74
-
```bash
74
+
```sh
75
75
pnpm test [path-to-test]
76
76
```
77
77
78
78
To debug a failing test. A good starting point is to `cd` into the failing tests dir. Proceed to `build` it. Then `preview` it. From here you will have increased information to help in the debug process. Eg:
79
-
```bash
79
+
```sh
80
80
# Each test is a standalone app
81
81
cd .test-output/addons/[addon-test]/[test-id]
82
82
pnpm build
@@ -91,32 +91,32 @@ There are a few guidelines we follow:
91
91
92
92
- Ensure `pnpm lint` and `pnpm check` pass. You can run `pnpm format` to format the code
93
93
- linting
94
-
```bash
94
+
```sh
95
95
# from root of project
96
96
pnpm lint
97
97
```
98
98
- formatting
99
-
```bash
99
+
```sh
100
100
# from root of project
101
101
pnpm format
102
102
```
103
103
- type checking
104
-
```bash
104
+
```sh
105
105
# from root of project
106
106
pnpm check
107
107
```
108
108
109
109
## svelte-migrate
110
110
To run svelte-migrate locally:
111
-
```bash
111
+
```sh
112
112
# from root of project
113
113
node ./packages/migrate/bin.js
114
114
```
115
115
116
116
## Generating changelogs
117
117
Only publish a change set if it is in 'sv' or 'svelte-migrate' as all other packages are bundled.
118
118
For changes to be reflected in package changelogs:
Copy file name to clipboardExpand all lines: documentation/docs/10-introduction/10-overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ The command line interface (CLI), `sv`, is a toolkit for creating and maintainin
8
8
9
9
The easiest way to run `sv` is with [`npx`](https://docs.npmjs.com/cli/v8/commands/npx) (or the equivalent command if you're using a different package manager — for example, `pnpx` if you're using [pnpm](https://pnpm.io/)):
Copy file name to clipboardExpand all lines: documentation/docs/20-commands/30-sv-check.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,13 @@ Requires Node 16 or later.
14
14
15
15
You will need to have the `svelte-check` package installed in your project:
16
16
17
-
```bash
17
+
```sh
18
18
npm i -D svelte-check
19
19
```
20
20
21
21
## Usage
22
22
23
-
```bash
23
+
```sh
24
24
npx sv check
25
25
```
26
26
@@ -59,7 +59,7 @@ Use this if you only want to check the Svelte files found in the current directo
59
59
60
60
Files/folders to ignore, relative to workspace root. Paths should be comma-separated and quoted. Example:
61
61
62
-
```bash
62
+
```sh
63
63
npx sv check --ignore "dist,build"
64
64
```
65
65
@@ -75,7 +75,7 @@ If provided, warnings will cause `sv check` to exit with an error code.
75
75
76
76
A quoted, comma-separated list of `code:behaviour` pairs where `code` is a [compiler warning code](../svelte/compiler-warnings) and `behaviour` is either `ignore` or `error`:
0 commit comments