output of npm create svelte@latest

This commit is contained in:
2023-08-11 09:11:36 +02:00
commit 052f3b71bf
21 changed files with 4009 additions and 0 deletions

13
.eslintignore Normal file
View File

@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock

30
.eslintrc.cjs Normal file
View File

@@ -0,0 +1,30 @@
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'prettier'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
},
env: {
browser: true,
es2017: true,
node: true
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
]
};

10
.gitignore vendored Normal file
View File

@@ -0,0 +1,10 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

2
.npmrc Normal file
View File

@@ -0,0 +1,2 @@
engine-strict=true
resolution-mode=highest

13
.prettierignore Normal file
View File

@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock

10
.prettierrc Normal file
View File

@@ -0,0 +1,10 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }],
"tabWidth": 4
}

38
README.md Normal file
View File

@@ -0,0 +1,38 @@
# create-svelte
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
## Creating a project
If you're seeing this, you've probably already done this step. Congrats!
```bash
# create a new project in the current directory
npm create svelte@latest
# create a new project in my-app
npm create svelte@latest my-app
```
## Developing
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
```bash
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
```
## Building
To create a production version of your app:
```bash
npm run build
```
You can preview the production build with `npm run preview`.
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.

3699
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

36
package.json Normal file
View File

@@ -0,0 +1,36 @@
{
"name": "flanders",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"test": "npm run test:integration && npm run test:unit",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write .",
"test:integration": "playwright test",
"test:unit": "vitest"
},
"devDependencies": {
"@playwright/test": "^1.28.1",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.20.4",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte": "^2.30.0",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.10.1",
"svelte": "^4.0.5",
"svelte-check": "^3.4.3",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^4.4.2",
"vitest": "^0.32.2"
},
"type": "module"
}

12
playwright.config.ts Normal file
View File

@@ -0,0 +1,12 @@
import type { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
webServer: {
command: 'npm run build && npm run preview',
port: 4173
},
testDir: 'tests',
testMatch: /(.+\.)?(test|spec)\.[jt]s/
};
export default config;

12
src/app.d.ts vendored Normal file
View File

@@ -0,0 +1,12 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
}
}
export {};

12
src/app.html Normal file
View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>

7
src/index.test.ts Normal file
View File

@@ -0,0 +1,7 @@
import { describe, it, expect } from 'vitest';
describe('sum test', () => {
it('adds 1 + 2 to equal 3', () => {
expect(1 + 2).toBe(3);
});
});

1
src/lib/index.ts Normal file
View File

@@ -0,0 +1 @@
// place files you want to import through the `$lib` alias in this folder.

2
src/routes/+page.svelte Normal file
View File

@@ -0,0 +1,2 @@
<h1>Welcome to SvelteKit</h1>
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>

BIN
static/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

62
static/icon-any.svg Normal file
View File

@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
id="Layer_1"
x="0px"
y="0px"
viewBox="0 0 122.88 122.87"
style="enable-background:new 0 0 122.88 122.87"
xml:space="preserve"
sodipodi:docname="icon-any.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
inkscape:export-filename="favicon-16x16.png"
inkscape:export-xdpi="12.5"
inkscape:export-ydpi="12.5"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs104"><linearGradient
inkscape:collect="always"
id="linearGradient1002"><stop
style="stop-color:#eb56eb;stop-opacity:1;"
offset="0"
id="stop998" /><stop
style="stop-color:#3e69dc;stop-opacity:1;"
offset="0.77366382"
id="stop1000" /></linearGradient><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient1002"
id="radialGradient1004"
cx="71.378616"
cy="101.25092"
fx="71.378616"
fy="101.25092"
r="61.439999"
gradientTransform="matrix(0.90994433,-0.34378475,0.353374,0.93532557,-23.050723,21.528416)"
gradientUnits="userSpaceOnUse"
spreadMethod="reflect" /></defs><sodipodi:namedview
id="namedview102"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showgrid="false"
inkscape:zoom="4.0597644"
inkscape:cx="89.167737"
inkscape:cy="86.2119"
inkscape:window-width="1920"
inkscape:window-height="1011"
inkscape:window-x="0"
inkscape:window-y="32"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><g
id="g99"
style="mix-blend-mode:normal;fill-opacity:1;fill-rule:evenodd;fill:url(#radialGradient1004);opacity:1"><path
d="m 29.8,57.42 c 0.51,-0.04 1.02,0.15 1.39,0.55 0.04,0.04 0.08,0.1 0.12,0.14 0.1,0.04 0.18,0.07 0.28,0.12 6.46,2.63 14.18,2.86 22.08,-0.45 0.04,-0.02 0.08,-0.04 0.13,-0.06 0.88,-0.37 1.89,0.04 2.26,0.92 l 5.83,13.89 5.79,-13.51 v 0 l 0.02,-0.04 c 0.39,-0.87 1.43,-1.24 2.29,-0.85 1.67,0.75 3.37,1.39 5.11,1.81 1.71,0.42 3.46,0.62 5.24,0.55 4.22,-0.17 8.02,-1.1 11.37,-2.58 0.29,-0.28 0.65,-0.44 1.02,-0.48 3.85,-1.9 7.05,-4.57 9.53,-7.71 2.1,-2.66 3.68,-5.66 4.71,-8.8 1.03,-3.14 1.5,-6.43 1.36,-9.69 -0.28,-6.79 -3.19,-13.42 -9.14,-18.14 -0.63,-0.46 -0.89,-1.3 -0.58,-2.05 L 103.15,0 c -1.54,0.79 -3.14,1.53 -4.76,2.22 -3.17,1.34 -6.47,2.5 -9.91,3.5 -0.27,0.11 -0.56,0.14 -0.87,0.1 C 82.73,5.08 78.32,5.28 74.33,6.26 70.08,7.3 66.29,9.23 62.92,11.84 v 0 c -0.56,0.44 -1.35,0.49 -1.98,0.09 C 56.33,8.99 51.96,6.98 47.83,6.02 43.81,5.09 40,5.16 36.4,6.34 v 0 C 36.08,6.45 35.73,6.46 35.38,6.35 31.92,5.34 28.54,4.09 25.4,2.72 23.58,1.93 21.85,1.1 20.22,0.26 c 0.32,0.82 0.67,1.63 1.03,2.45 1.12,2.52 2.41,5 3.73,7.3 0.49,0.73 0.34,1.73 -0.36,2.3 -1.88,1.52 -3.48,3.14 -4.78,4.83 -1.3,1.68 -2.31,3.46 -3.06,5.33 -3.04,7.48 -2.71,14.91 -0.07,21.16 1.39,3.3 3.43,6.27 5.96,8.77 2.08,2 4.49,3.72 7.13,5.02 z m 12.15,-31.8 c 2.01,0 3.83,0.82 5.15,2.13 1.32,1.32 2.13,3.14 2.13,5.15 0,2.01 -0.82,3.83 -2.13,5.15 -1.32,1.32 -3.14,2.13 -5.15,2.13 -2.01,0 -3.83,-0.82 -5.15,-2.13 -1.32,-1.32 -2.13,-3.14 -2.13,-5.15 0,-2.01 0.82,-3.83 2.13,-5.15 1.32,-1.31 3.14,-2.13 5.15,-2.13 z m 38.39,0 c 2.01,0 3.83,0.82 5.15,2.13 1.32,1.32 2.13,3.14 2.13,5.15 0,2.01 -0.82,3.83 -2.13,5.15 -1.32,1.32 -3.14,2.13 -5.15,2.13 -2.01,0 -3.83,-0.82 -5.14,-2.13 -1.32,-1.32 -2.13,-3.14 -2.13,-5.15 0,-2.01 0.82,-3.83 2.13,-5.15 1.31,-1.31 3.13,-2.13 5.14,-2.13 z m 0,-10.42 c 4.84,0 9.22,1.96 12.39,5.14 3.17,3.17 5.14,7.55 5.14,12.39 0,4.84 -1.96,9.22 -5.14,12.39 -3.17,3.17 -7.55,5.14 -12.39,5.14 -4.84,0 -9.22,-1.96 -12.39,-5.14 -3.17,-3.17 -5.13,-7.55 -5.13,-12.39 0,-4.84 1.96,-9.22 5.13,-12.39 3.17,-3.17 7.55,-5.14 12.39,-5.14 z m -38.39,0 c 4.84,0 9.22,1.96 12.39,5.14 3.17,3.17 5.14,7.55 5.14,12.39 0,4.84 -1.96,9.22 -5.14,12.39 -3.17,3.17 -7.55,5.14 -12.39,5.14 -4.84,0 -9.22,-1.96 -12.39,-5.14 -3.17,-3.17 -5.13,-7.55 -5.13,-12.39 0,-4.84 1.96,-9.22 5.13,-12.39 3.17,-3.17 7.55,-5.14 12.39,-5.14 z m 55.5,50.74 c 1.31,3.36 2.19,6.73 2.67,10.12 l 0.01,0.06 c 0.77,5.43 0.51,10.89 -0.69,16.35 -1.21,5.54 -3.16,10.78 -6.01,15.47 -0.15,0.25 -0.31,0.5 -0.47,0.74 2.63,0.75 7.35,0.06 12.46,-1.47 6.41,-1.91 13.24,-5.16 17.46,-8.55 C 118.29,91.81 114.12,85.67 109.59,79.81 105.9,75.09 102,70.53 97.45,65.94 Z m -66.4,-2.85 c -0.95,2.87 -1.67,5.75 -2.19,8.64 -0.61,3.42 -0.93,6.84 -0.94,10.24 -0.02,8.11 1.53,16.1 5.11,22.86 0.62,1.17 1.31,2.31 2.05,3.4 0.06,0.07 0.12,0.16 0.17,0.24 3,4.32 7.01,7.97 12.16,10.6 v 0 c 0.02,0.01 0.04,0.02 0.06,0.03 2.19,1.23 4.39,2.16 6.61,2.78 2.22,0.63 4.47,0.95 6.72,0.98 3.3,0.04 6.55,-0.52 9.66,-1.57 3.26,-1.11 6.37,-2.75 9.19,-4.82 3.94,-2.89 7.04,-6.39 9.43,-10.34 2.64,-4.34 4.43,-9.22 5.58,-14.41 1.12,-5.08 1.36,-10.13 0.65,-15.15 L 95.3,76.52 c -0.64,-4.47 -2.02,-8.91 -4.21,-13.31 -3.21,1.18 -6.76,1.9 -10.62,2.06 -2.13,0.09 -4.19,-0.16 -6.19,-0.64 -1.4,-0.34 -2.76,-0.79 -4.11,-1.33 L 63.46,79 c -0.37,0.88 -1.39,1.29 -2.26,0.92 -0.44,-0.18 -0.74,-0.52 -0.92,-0.93 v 0 L 53.53,62.9 c -7.99,2.97 -15.79,2.7 -22.48,0.19 z M 25.17,66.2 C 20.73,70.7 16.9,75.17 13.29,79.84 8.77,85.7 4.59,91.84 0,98.69 c 4.21,3.39 11.04,6.63 17.46,8.55 5.1,1.52 9.81,2.22 12.45,1.47 -0.46,-0.73 -0.88,-1.49 -1.29,-2.25 C 24.77,99.18 23.09,90.64 23.11,82 c 0.01,-3.65 0.33,-7.26 0.97,-10.83 0.3,-1.68 0.66,-3.32 1.09,-4.97 z"
id="path97"
style="fill-opacity:1;fill-rule:evenodd;fill:url(#radialGradient1004)" /></g></svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

18
svelte.config.js Normal file
View File

@@ -0,0 +1,18 @@
import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/kit/vite';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter()
}
};
export default config;

6
tests/test.ts Normal file
View File

@@ -0,0 +1,6 @@
import { expect, test } from '@playwright/test';
test('index page has expected h1', async ({ page }) => {
await page.goto('/');
await expect(page.getByRole('heading', { name: 'Welcome to SvelteKit' })).toBeVisible();
});

17
tsconfig.json Normal file
View File

@@ -0,0 +1,17 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}

9
vite.config.ts Normal file
View File

@@ -0,0 +1,9 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [sveltekit()],
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
}
});