Skip to content

Commit f5ad79e

Browse files
committed
*: 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.
1 parent cf3a2f6 commit f5ad79e

22 files changed

+57
-57
lines changed

CONTRIBUTING.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Please keep your pull requests focused to feature or issue. Focused smaller chan
1616
## Preparing
1717
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:
1818

19-
```bash
19+
```sh
2020
npm i -g pnpm
2121
```
2222

@@ -25,27 +25,27 @@ Linux users, you will have to ensure 'sudo' is not required. See [docker post in
2525

2626
`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:
2727

28-
```bash
28+
```sh
2929
cd cli
3030
pnpm install
3131
```
3232

3333
## Build and run
3434
To build the project and all packages. Run the 'build' script:
3535

36-
```bash
36+
```sh
3737
# from root of project
3838
pnpm build
3939
```
4040
This outputs into /packages/PACKAGE/dist/.
4141

4242
Run the 'cli' package:
43-
```bash
43+
```sh
4444
pnpm sv
4545
```
4646

4747
Run build with watch mode:
48-
```bash
48+
```sh
4949
pnpm dev
5050
```
5151

@@ -54,29 +54,29 @@ pnpm dev
5454
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.
5555

5656
Run all tests:
57-
```bash
57+
```sh
5858
# from root of project
5959
pnpm test
6060
```
6161

6262
Run tests with vitest ui:
63-
```bash
63+
```sh
6464
# from root of project
6565
pnpm test:ui
6666
```
6767

6868
Run package specific tests by specifying a project flag to the package and running the test command. Eg:
69-
```bash
69+
```sh
7070
pnpm test --project core # addons / create / migrate / etc.
7171
```
7272

7373
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
7575
pnpm test [path-to-test]
7676
```
7777

7878
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
8080
# Each test is a standalone app
8181
cd .test-output/addons/[addon-test]/[test-id]
8282
pnpm build
@@ -91,32 +91,32 @@ There are a few guidelines we follow:
9191

9292
- Ensure `pnpm lint` and `pnpm check` pass. You can run `pnpm format` to format the code
9393
- linting
94-
```bash
94+
```sh
9595
# from root of project
9696
pnpm lint
9797
```
9898
- formatting
99-
```bash
99+
```sh
100100
# from root of project
101101
pnpm format
102102
```
103103
- type checking
104-
```bash
104+
```sh
105105
# from root of project
106106
pnpm check
107107
```
108108

109109
## svelte-migrate
110110
To run svelte-migrate locally:
111-
```bash
111+
```sh
112112
# from root of project
113113
node ./packages/migrate/bin.js
114114
```
115115

116116
## Generating changelogs
117117
Only publish a change set if it is in 'sv' or 'svelte-migrate' as all other packages are bundled.
118118
For changes to be reflected in package changelogs:
119-
```bash
119+
```sh
120120
# from root of project
121121
pnpm changeset:publish
122122
```

documentation/docs/10-introduction/10-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The command line interface (CLI), `sv`, is a toolkit for creating and maintainin
88

99
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/)):
1010

11-
```bash
11+
```sh
1212
npx sv <command> <args>
1313
```
1414

documentation/docs/20-commands/10-sv-create.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: sv create
66

77
## Usage
88

9-
```bash
9+
```sh
1010
npx sv create [options] [path]
1111
```
1212

documentation/docs/20-commands/20-sv-add.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ title: sv add
66

77
## Usage
88

9-
```bash
9+
```sh
1010
npx sv add
1111
```
1212

13-
```bash
13+
```sh
1414
npx sv add [add-ons]
1515
```
1616

documentation/docs/20-commands/30-sv-check.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ Requires Node 16 or later.
1414

1515
You will need to have the `svelte-check` package installed in your project:
1616

17-
```bash
17+
```sh
1818
npm i -D svelte-check
1919
```
2020

2121
## Usage
2222

23-
```bash
23+
```sh
2424
npx sv check
2525
```
2626

@@ -59,7 +59,7 @@ Use this if you only want to check the Svelte files found in the current directo
5959

6060
Files/folders to ignore, relative to workspace root. Paths should be comma-separated and quoted. Example:
6161

62-
```bash
62+
```sh
6363
npx sv check --ignore "dist,build"
6464
```
6565

@@ -75,7 +75,7 @@ If provided, warnings will cause `sv check` to exit with an error code.
7575

7676
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`:
7777

78-
```bash
78+
```sh
7979
npx sv check --compiler-warnings "css_unused_selector:ignore,a11y_missing_attribute:error"
8080
```
8181

@@ -90,7 +90,7 @@ A quoted, comma-separated list of sources that should run diagnostics on your co
9090

9191
Example:
9292

93-
```bash
93+
```sh
9494
npx sv check --diagnostic-sources "js,svelte"
9595
```
9696

documentation/docs/20-commands/40-sv-migrate.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ Some migrations may annotate your codebase with tasks for completion that you ca
88

99
## Usage
1010

11-
```bash
11+
```sh
1212
npx sv migrate
1313
```
1414

1515
You can also specify a migration directly via the CLI:
16-
```bash
16+
```sh
1717
npx sv migrate [migration]
1818
```
1919

documentation/docs/30-add-ons/03-devtools-json.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function handle({ event, resolve }) {
3030

3131
## Usage
3232

33-
```bash
33+
```sh
3434
npx sv add devtools-json
3535
```
3636

documentation/docs/30-add-ons/05-drizzle.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: drizzle
66

77
## Usage
88

9-
```bash
9+
```sh
1010
npx sv add drizzle
1111
```
1212

@@ -27,7 +27,7 @@ Which database variant to use:
2727
- `mysql` — another popular open source database
2828
- `sqlite` — file-based database not requiring a database server
2929

30-
```bash
30+
```sh
3131
npx sv add drizzle=database:postgresql
3232
```
3333

@@ -39,7 +39,7 @@ The SQL client to use, depends on `database`:
3939
- For `mysql`: `mysql2`, `planetscale`
4040
- For `sqlite`: `better-sqlite3`, `libsql`, `turso`
4141

42-
```bash
42+
```sh
4343
npx sv add drizzle=database:postgresql+client:postgres.js
4444
```
4545

@@ -49,6 +49,6 @@ Drizzle is compatible with well over a dozen database drivers. We just offer a f
4949

5050
Whether to add Docker Compose configuration. Only available for [`database`](#Options-database) `postgresql` or `mysql`
5151

52-
```bash
52+
```sh
5353
npx sv add drizzle=database:postgresql+client:postgres.js+docker:yes
5454
```

documentation/docs/30-add-ons/10-eslint.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: eslint
66

77
## Usage
88

9-
```bash
9+
```sh
1010
npx sv add eslint
1111
```
1212

documentation/docs/30-add-ons/15-lucia.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ An auth setup following [the Lucia auth guide](https://lucia-auth.com/).
66

77
## Usage
88

9-
```bash
9+
```sh
1010
npx sv add lucia
1111
```
1212

@@ -21,6 +21,6 @@ npx sv add lucia
2121

2222
Whether to include demo registration and login pages.
2323

24-
```bash
24+
```sh
2525
npx sv add lucia=demo:yes
2626
```

0 commit comments

Comments
 (0)