Skip to content

Commit a042a97

Browse files
authored
Merge pull request #330 from PetalNet/feat/grove-sveltekit-3
feat(grove): scaffold SvelteKit 3 app
2 parents 79a1781 + 81db29d commit a042a97

14 files changed

Lines changed: 203 additions & 0 deletions

File tree

apps/grove/.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
node_modules
2+
3+
# Output
4+
.output
5+
.vercel
6+
.netlify
7+
.wrangler
8+
/.svelte-kit
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-*

apps/grove/.vscode/extensions.json

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

apps/grove/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Grove
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+
```sh
10+
# create a new project
11+
npx sv create my-app
12+
```
13+
14+
To recreate this project with the same configuration:
15+
16+
```sh
17+
# recreate this project
18+
npx sv@0.16.5 create --template minimal --types ts --add experimental="versions:kit+features:async,remoteFunctions" --no-install apps/grove
19+
```
20+
21+
## Developing
22+
23+
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
24+
25+
```sh
26+
npm run dev
27+
28+
# or start the server and open the app in a new browser tab
29+
npm run dev -- --open
30+
```
31+
32+
## Building
33+
34+
To create a production version of your app:
35+
36+
```sh
37+
npm run build
38+
```
39+
40+
You can preview the production build with `npm run preview`.
41+
42+
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.

apps/grove/package.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "@petalnet/grove",
3+
"version": "0.0.1",
4+
"private": true,
5+
"type": "module",
6+
"imports": {
7+
"#lib/*": "./src/lib/*"
8+
},
9+
"scripts": {
10+
"build": "vite build",
11+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
12+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
13+
"dev": "vite dev",
14+
"prepare": "svelte-kit sync",
15+
"preview": "vite preview"
16+
},
17+
"devDependencies": {
18+
"@sveltejs/adapter-node": "catalog:dev",
19+
"@sveltejs/kit": "catalog:",
20+
"@sveltejs/vite-plugin-svelte": "catalog:dev",
21+
"svelte": "catalog:prod",
22+
"svelte-check": "catalog:dev",
23+
"typescript": "catalog:dev",
24+
"vite": "catalog:dev"
25+
}
26+
}

apps/grove/src/app.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// See https://svelte.dev/docs/kit/types#app.d.ts
2+
// for information about these interfaces
3+
declare global {
4+
namespace App {
5+
// interface Error {}
6+
// interface Locals {}
7+
// interface PageData {}
8+
// interface PageState {}
9+
// interface Platform {}
10+
}
11+
}
12+
13+
export type AppTypesReady = true;

apps/grove/src/app.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<meta name="text-scale" content="scale" />
7+
%sveltekit.head%
8+
</head>
9+
<body data-sveltekit-preload-data="hover">
10+
<div style="display: contents">%sveltekit.body%</div>
11+
</body>
12+
</html>
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<script lang="ts">
2+
import favicon from '#lib/assets/favicon.svg';
3+
4+
let { children } = $props();
5+
</script>
6+
7+
<svelte:head>
8+
<link rel="icon" href={favicon} />
9+
</svelte:head>
10+
11+
{@render children()}

apps/grove/src/routes/+page.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<h1>Welcome to SvelteKit</h1>
2+
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>

apps/grove/static/robots.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# allow crawling everything by default
2+
User-agent: *
3+
Disallow:

0 commit comments

Comments
 (0)