Skip to content

Commit 1b58184

Browse files
Merge pull request #298 from TorstenDittmann/feat-svelte-5
feat: svelte 5
2 parents 4cc698c + 3c49c53 commit 1b58184

64 files changed

Lines changed: 2165 additions & 3400 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ jobs:
1414
- run: npm install -g --force corepack@latest
1515
- run: corepack enable
1616
- run: pnpm install --frozen-lockfile
17+
- run: pnpm run build
1718
- run: pnpm run lint

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
- run: corepack enable
2020
- run: pnpm install --frozen-lockfile
2121
- run: pnpm run build
22-
- run: pnpm test
22+
- run: pnpm run test

apps/demo/.eslintignore

Lines changed: 0 additions & 13 deletions
This file was deleted.

apps/demo/.eslintrc.cjs

Lines changed: 0 additions & 31 deletions
This file was deleted.

apps/demo/.gitignore

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
.DS_Store
1+
test-results
22
node_modules
3-
/build
3+
4+
# Output
5+
.output
6+
.vercel
7+
.netlify
8+
.wrangler
49
/.svelte-kit
5-
/package
10+
/build
11+
12+
# OS
13+
.DS_Store
14+
Thumbs.db
15+
16+
# Env
617
.env
718
.env.*
819
!.env.example
20+
!.env.test
21+
22+
# Vite
923
vite.config.js.timestamp-*
1024
vite.config.ts.timestamp-*
11-
/test-results

apps/demo/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

apps/demo/.prettierignore

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
.DS_Store
2-
node_modules
3-
/build
4-
/.svelte-kit
5-
/package
6-
.env
7-
.env.*
8-
!.env.example
9-
10-
# Ignore files for PNPM, NPM and YARN
11-
pnpm-lock.yaml
1+
# Package Managers
122
package-lock.json
3+
pnpm-lock.yaml
134
yarn.lock
5+
bun.lock
6+
bun.lockb

apps/demo/.prettierrc

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
{
2-
"useTabs": false,
3-
"tabWidth": 4,
4-
"singleQuote": true,
5-
"trailingComma": "all",
6-
"printWidth": 100,
7-
"plugins": ["prettier-plugin-svelte"],
8-
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
2+
"useTabs": true,
3+
"singleQuote": true,
4+
"trailingComma": "none",
5+
"printWidth": 100,
6+
"plugins": ["prettier-plugin-svelte"],
7+
"overrides": [
8+
{
9+
"files": "*.svelte",
10+
"options": {
11+
"parser": "svelte"
12+
}
13+
}
14+
]
915
}

apps/demo/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# sv
2+
3+
Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
4+
5+
## Creating a project
6+
7+
If you're seeing this, you've probably already done this step. Congrats!
8+
9+
```bash
10+
# create a new project in the current directory
11+
npx sv create
12+
13+
# create a new project in my-app
14+
npx sv create my-app
15+
```
16+
17+
## Developing
18+
19+
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
20+
21+
```bash
22+
npm run dev
23+
24+
# or start the server and open the app in a new browser tab
25+
npm run dev -- --open
26+
```
27+
28+
## Building
29+
30+
To create a production version of your app:
31+
32+
```bash
33+
npm run build
34+
```
35+
36+
You can preview the production build with `npm run preview`.
37+
38+
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.

apps/demo/e2e/demo.test.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { expect, test } from '@playwright/test';
2+
3+
test('tags work', async ({ page }) => {
4+
await page.goto('http://localhost:4173/playground/tags');
5+
6+
expect(await page.content()).toContain('Addition');
7+
expect(await page.content()).toContain('Multiply');
8+
expect(await page.content()).toContain('Types');
9+
});
10+
11+
test('tags work with types', async ({ page }) => {
12+
await page.goto('http://localhost:4173/playground/tags');
13+
14+
expect(await page.content()).toContain('Types');
15+
expect(await page.content()).toContain('<b>lorem ipsum</b> is typeof <b>string</b>');
16+
expect(await page.content()).toContain('<b>123</b> is typeof <b>number</b>');
17+
expect(await page.content()).toContain('<b>true</b> is typeof <b>boolean</b>');
18+
});
19+
20+
test('partials work', async ({ page }) => {
21+
await page.goto('http://localhost:4173/playground/partials');
22+
23+
expect(await page.content()).toContain('I am a partial.');
24+
expect(await page.content()).toContain('I am a nested partial.');
25+
expect(await page.content()).toContain('I am passed to a variable.');
26+
});
27+
28+
test('named layouts work', async ({ page }) => {
29+
await page.goto('http://localhost:4173/playground/layout');
30+
31+
expect(await page.content()).toContain('I am on an alternative layout');
32+
expect(await page.content()).toContain('And it works!');
33+
});

0 commit comments

Comments
 (0)