Skip to content

Commit 4d817fa

Browse files
committedApr 29, 2023
init
0 parents  commit 4d817fa

18 files changed

+3322
-0
lines changed
 

‎.eslintignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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
12+
package-lock.json
13+
yarn.lock

‎.eslintrc.cjs

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module.exports = {
2+
root: true,
3+
extends: [
4+
'eslint:recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'plugin:svelte/recommended',
7+
'prettier'
8+
],
9+
parser: '@typescript-eslint/parser',
10+
plugins: ['@typescript-eslint'],
11+
ignorePatterns: ['*.cjs'],
12+
parserOptions: {
13+
sourceType: 'module',
14+
ecmaVersion: 2020,
15+
extraFileExtensions: ['.svelte']
16+
},
17+
env: {
18+
browser: true,
19+
es2017: true,
20+
node: true
21+
},
22+
overrides: [
23+
{
24+
files: ['*.svelte'],
25+
parser: 'svelte-eslint-parser',
26+
parserOptions: {
27+
parser: '@typescript-eslint/parser'
28+
}
29+
}
30+
]
31+
};

‎.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

‎.npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
engine-strict=true
2+
resolution-mode=highest

‎.prettierignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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
12+
package-lock.json
13+
yarn.lock

‎.prettierrc

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

‎.vscode/extensions.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["svelte.svelte-vscode"]
3+
}

‎index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + Svelte + TS</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>

‎package-lock.json

+3,058
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "monkey-patcx",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "vite build",
9+
"preview": "vite preview",
10+
"check": "svelte-check --tsconfig ./tsconfig.json",
11+
"test:unit": "vitest",
12+
"lint": "prettier --plugin-search-dir . --check . && eslint .",
13+
"format": "prettier --plugin-search-dir . --write ."
14+
},
15+
"devDependencies": {
16+
"@sveltejs/vite-plugin-svelte": "^2.0.3",
17+
"@tsconfig/svelte": "^4.0.1",
18+
"@typescript-eslint/eslint-plugin": "^5.45.0",
19+
"@typescript-eslint/parser": "^5.45.0",
20+
"eslint": "^8.28.0",
21+
"eslint-config-prettier": "^8.5.0",
22+
"eslint-plugin-svelte": "^2.26.0",
23+
"prettier": "^2.8.0",
24+
"prettier-plugin-svelte": "^2.8.1",
25+
"svelte": "^3.57.0",
26+
"svelte-check": "^2.10.3",
27+
"tslib": "^2.5.0",
28+
"typescript": "^5.0.2",
29+
"vite": "^4.3.2",
30+
"vitest": "^0.25.3"
31+
}
32+
}

‎src/App.svelte

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<script lang="ts">
2+
</script>
3+
4+
<main>
5+
<p>
6+
Hello, World!!
7+
</p>
8+
</main>
9+
10+
<style>
11+
</style>

‎src/app.css

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
:root {
2+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
3+
line-height: 1.5;
4+
font-weight: 400;
5+
6+
color-scheme: light dark;
7+
color: rgba(255, 255, 255, 0.87);
8+
background-color: #242424;
9+
10+
font-synthesis: none;
11+
text-rendering: optimizeLegibility;
12+
-webkit-font-smoothing: antialiased;
13+
-moz-osx-font-smoothing: grayscale;
14+
-webkit-text-size-adjust: 100%;
15+
}
16+
17+
a {
18+
font-weight: 500;
19+
text-decoration: inherit;
20+
}
21+
22+
body {
23+
margin: 0;
24+
display: flex;
25+
place-items: center;
26+
min-width: 320px;
27+
min-height: 100vh;
28+
}
29+
30+
h1 {
31+
font-size: 3.2em;
32+
line-height: 1.1;
33+
}
34+
35+
#app {
36+
max-width: 1280px;
37+
margin: 0 auto;
38+
padding: 2rem;
39+
text-align: center;
40+
}
41+
42+
button {
43+
border-radius: 8px;
44+
border: 1px solid transparent;
45+
padding: 0.6em 1.2em;
46+
font-size: 1em;
47+
font-weight: 500;
48+
font-family: inherit;
49+
background-color: #1a1a1a;
50+
cursor: pointer;
51+
transition: border-color 0.25s;
52+
}
53+
button:focus,
54+
button:focus-visible {
55+
outline: 4px auto -webkit-focus-ring-color;
56+
}
57+
58+
@media (prefers-color-scheme: light) {
59+
:root {
60+
color: #000000;
61+
background-color: #ffffff;
62+
}
63+
button {
64+
background-color: #f9f9f9;
65+
}
66+
}

‎src/main.ts

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import './app.css'
2+
import App from './App.svelte'
3+
4+
const app = new App({
5+
target: document.getElementById('app'),
6+
})
7+
8+
export default app

‎src/vite-env.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/// <reference types="svelte" />
2+
/// <reference types="vite/client" />

‎svelte.config.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
2+
3+
export default {
4+
// Consult https://svelte.dev/docs#compile-time-svelte-preprocess
5+
// for more information about preprocessors
6+
preprocess: vitePreprocess(),
7+
}

‎tsconfig.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": "@tsconfig/svelte/tsconfig.json",
3+
"compilerOptions": {
4+
"target": "ESNext",
5+
"useDefineForClassFields": true,
6+
"module": "ESNext",
7+
"resolveJsonModule": true,
8+
"allowJs": true,
9+
"checkJs": true,
10+
"isolatedModules": true
11+
},
12+
"include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"],
13+
"references": [{ "path": "./tsconfig.node.json" }]
14+
}

‎tsconfig.node.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"compilerOptions": {
3+
"composite": true,
4+
"skipLibCheck": true,
5+
"module": "ESNext",
6+
"moduleResolution": "bundler"
7+
},
8+
"include": ["vite.config.ts"]
9+
}

‎vite.config.ts

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineConfig } from 'vite'
2+
import { svelte } from '@sveltejs/vite-plugin-svelte'
3+
4+
// https://vitejs.dev/config/
5+
export default defineConfig({
6+
plugins: [svelte()],
7+
})

0 commit comments

Comments
 (0)
Please sign in to comment.