Skip to content

Commit 968573e

Browse files
committed
Initial commit
0 parents  commit 968573e

32 files changed

+5634
-0
lines changed

.gitignore

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
test-results
2+
node_modules
3+
4+
# Output
5+
.output
6+
.vercel
7+
.netlify
8+
.wrangler
9+
/.svelte-kit
10+
/build
11+
12+
# OS
13+
.DS_Store
14+
Thumbs.db
15+
16+
# Env
17+
.env
18+
.env.*
19+
!.env.example
20+
!.env.test
21+
22+
# Vite
23+
vite.config.js.timestamp-*
24+
vite.config.ts.timestamp-*
25+
26+
# Paraglide
27+
src/lib/paraglide

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Package Managers
2+
package-lock.json
3+
pnpm-lock.yaml
4+
yarn.lock

.prettierrc

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

README.md

+38
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.

e2e/demo.test.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { expect, test } from '@playwright/test';
2+
3+
test('home page has expected h1', async ({ page }) => {
4+
await page.goto('/');
5+
await expect(page.locator('h1')).toBeVisible();
6+
});

eslint.config.js

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import prettier from 'eslint-config-prettier';
2+
import js from '@eslint/js';
3+
import { includeIgnoreFile } from '@eslint/compat';
4+
import svelte from 'eslint-plugin-svelte';
5+
import globals from 'globals';
6+
import { fileURLToPath } from 'node:url';
7+
import ts from 'typescript-eslint';
8+
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
9+
10+
export default ts.config(
11+
includeIgnoreFile(gitignorePath),
12+
js.configs.recommended,
13+
...ts.configs.recommended,
14+
...svelte.configs['flat/recommended'],
15+
prettier,
16+
...svelte.configs['flat/prettier'],
17+
{
18+
languageOptions: {
19+
globals: {
20+
...globals.browser,
21+
...globals.node
22+
}
23+
}
24+
},
25+
{
26+
files: ['**/*.svelte'],
27+
28+
languageOptions: {
29+
parserOptions: {
30+
parser: ts.parser
31+
}
32+
}
33+
}
34+
);

messages/en.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://inlang.com/schema/inlang-message-format",
3+
"hello_world": "Hello, {name} from en!"
4+
}

messages/nl.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://inlang.com/schema/inlang-message-format",
3+
"hello_world": "Hallo, {name} van nl!"
4+
}

package.json

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"name": "app",
3+
"private": true,
4+
"version": "0.0.1",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite dev",
8+
"build": "vite build",
9+
"preview": "vite preview",
10+
"prepare": "svelte-kit sync || echo ''",
11+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
12+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
13+
"format": "prettier --write .",
14+
"lint": "prettier --check . && eslint .",
15+
"test:unit": "vitest",
16+
"test": "npm run test:unit -- --run && npm run test:e2e",
17+
"test:e2e": "playwright test"
18+
},
19+
"devDependencies": {
20+
"@eslint/compat": "^1.2.5",
21+
"@eslint/js": "^9.18.0",
22+
"@playwright/test": "^1.49.1",
23+
"@sveltejs/adapter-cloudflare": "^5.0.1",
24+
"@sveltejs/kit": "^2.16.0",
25+
"@sveltejs/vite-plugin-svelte": "^5.0.0",
26+
"@tailwindcss/vite": "^4.0.0",
27+
"@testing-library/jest-dom": "^6.6.3",
28+
"@testing-library/svelte": "^5.2.4",
29+
"eslint": "^9.18.0",
30+
"eslint-config-prettier": "^10.0.1",
31+
"eslint-plugin-svelte": "^2.46.1",
32+
"globals": "^15.14.0",
33+
"jsdom": "^25.0.1",
34+
"prettier": "^3.4.2",
35+
"prettier-plugin-svelte": "^3.3.3",
36+
"prettier-plugin-tailwindcss": "^0.6.11",
37+
"svelte": "^5.0.0",
38+
"svelte-check": "^4.0.0",
39+
"tailwindcss": "^4.0.0",
40+
"typescript": "^5.0.0",
41+
"typescript-eslint": "^8.20.0",
42+
"vite": "^6.0.0",
43+
"vitest": "^3.0.0"
44+
},
45+
"dependencies": {
46+
"@inlang/paraglide-sveltekit": "^0.15.5"
47+
},
48+
"pnpm": {
49+
"onlyBuiltDependencies": [
50+
"esbuild"
51+
]
52+
},
53+
"packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0"
54+
}

playwright.config.ts

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { defineConfig } from '@playwright/test';
2+
3+
export default defineConfig({
4+
webServer: {
5+
command: 'npm run build && npm run preview',
6+
port: 4173
7+
},
8+
9+
testDir: 'e2e'
10+
});

0 commit comments

Comments
 (0)