Skip to content

Commit 7112902

Browse files
authored
chore: use current templating (#192)
1 parent a6f6bc7 commit 7112902

File tree

10 files changed

+53
-22
lines changed

10 files changed

+53
-22
lines changed

.gitignore

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
1-
.DS_Store
2-
/node_modules
3-
/build
4-
/.netlify
1+
node_modules
2+
3+
# Output
4+
.output
5+
.vercel
6+
.netlify
7+
.wrangler
58
/.svelte-kit
6-
/.vercel
9+
/build
10+
11+
# OS
12+
.DS_Store
13+
Thumbs.db
14+
15+
# Env
16+
.env
17+
.env.*
18+
!.env.example
19+
!.env.test
20+
21+
# Vite
22+
vite.config.js.timestamp-*
23+
vite.config.ts.timestamp-*

.prettierrc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,14 @@
22
"useTabs": true,
33
"singleQuote": true,
44
"trailingComma": "none",
5-
"printWidth": 100
5+
"printWidth": 100,
6+
"plugins": ["prettier-plugin-svelte"],
7+
"overrides": [
8+
{
9+
"files": "*.svelte",
10+
"options": {
11+
"parser": "svelte"
12+
}
13+
}
14+
]
615
}

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ For more information on how to this works with other frontends/backends, head ov
1010

1111
## Running locally
1212

13-
```bash
14-
npm install
15-
npm run dev
13+
```sh
14+
pnpm install
15+
pnpm run dev
1616
```
1717

1818
To build and start in prod mode:
1919

20-
```bash
21-
npm run build
22-
npm run preview
20+
```sh
21+
pnpm run build
22+
pnpm run preview
2323
```

src/app.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="/favicon.ico" />
65
<meta name="viewport" content="width=device-width, initial-scale=1" />
76
<link rel="manifest" href="/manifest.json" />
87

@@ -23,6 +22,6 @@
2322
%sveltekit.head%
2423
</head>
2524
<body data-sveltekit-preload-data="hover">
26-
<div>%sveltekit.body%</div>
25+
<div style="display: contents">%sveltekit.body%</div>
2726
</body>
2827
</html>

src/routes/+layout.svelte

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
<script>
22
import { navigating } from '$app/state';
3+
import favicon from '$lib/assets/favicon.ico';
34
import Nav from './Nav.svelte';
45
import PreloadingIndicator from './PreloadingIndicator.svelte';
56
67
const { children } = $props();
78
</script>
89

10+
<svelte:head>
11+
<link rel="icon" href={favicon} />
12+
</svelte:head>
13+
914
{#if navigating}
1015
<PreloadingIndicator />
1116
{/if}

src/routes/article/[slug]/CommentInput.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
<form use:enhance method="POST" action="?/createComment" class="card comment-form">
99
<div class="card-block">
10-
<textarea class="form-control" name="comment" placeholder="Write a comment..." rows="3"></textarea>
10+
<textarea class="form-control" name="comment" placeholder="Write a comment..." rows="3"
11+
></textarea>
1112
</div>
1213

1314
<div class="card-footer">

static/robots.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# https://www.robotstxt.org/robotstxt.html
1+
# allow crawling everything by default
22
User-agent: *
33
Disallow:

svelte.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import adapter from '@sveltejs/adapter-vercel';
22

33
/** @type {import('@sveltejs/kit').Config} */
4-
export default {
4+
const config = {
55
compilerOptions: {
66
runes: true
77
},
88
kit: {
99
adapter: adapter({ runtime: 'edge' })
1010
}
1111
};
12+
13+
export default config;

vite.config.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { sveltekit } from '@sveltejs/kit/vite';
2+
import { defineConfig } from 'vite';
23

3-
/** @type {import('vite').UserConfig} */
4-
const config = {
4+
export default defineConfig({
55
plugins: [sveltekit()]
6-
};
7-
8-
export default config;
6+
});

0 commit comments

Comments
 (0)