Skip to content

Commit 680141a

Browse files
committed
feat(svelte-integration): svelte minimal playground app
1 parent 673c880 commit 680141a

File tree

13 files changed

+385
-0
lines changed

13 files changed

+385
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Dependencies
2+
node_modules
3+
4+
# Build output
5+
.output
6+
.vercel
7+
.netlify
8+
.wrangler
9+
.svelte-kit
10+
build
11+
dist
12+
13+
# OS
14+
.DS_Store
15+
Thumbs.db
16+
17+
# IDE
18+
.idea/
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Hawk Error Tracker - SvelteKit Playground
2+
3+
Test playground for Hawk Error Tracker integration with SvelteKit and Svelte.
4+
5+
## Table of Contents
6+
7+
- [Getting Started](#getting-started)
8+
9+
## Getting Started
10+
11+
### Setup
12+
13+
**1. Install dependencies:**
14+
15+
```shell
16+
yarn install
17+
```
18+
19+
**2. Start development server:**
20+
21+
```shell
22+
yarn dev
23+
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"private": true,
3+
"name": "@hawk.so/svelte-playground",
4+
"version": "1.0.0",
5+
"type": "module",
6+
"description": "Svelte playground for testing Hawk error handling integration",
7+
"scripts": {
8+
"dev": "vite dev",
9+
"build": "vite build",
10+
"preview": "vite preview"
11+
},
12+
"devDependencies": {
13+
"@sveltejs/kit": "^2.48.5",
14+
"@sveltejs/vite-plugin-svelte": "^6.2.1",
15+
"svelte": "^5.45.10"
16+
}
17+
}

packages/svelte-playground/src/app.css

Whitespace-only changes.
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 {};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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+
%sveltekit.head%
7+
</head>
8+
<body data-sveltekit-preload-data="hover">
9+
<div style="display: contents">%sveltekit.body%</div>
10+
</body>
11+
</html>
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<script lang="ts">
2+
import '../app.css';
3+
import favicon from '$lib/assets/favicon.svg';
4+
5+
let {children} = $props();
6+
</script>
7+
8+
<svelte:head>
9+
<link rel="icon" href={favicon}/>
10+
</svelte:head>
11+
12+
{@render children()}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<svelte:head>
2+
<title>Hawk Javascript SvelteKit Integration Playground</title>
3+
</svelte:head>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* SvelteKit configuration file
3+
*
4+
* This file configures the SvelteKit application build process and runtime behavior.
5+
*
6+
* @see {@link https://kit.svelte.dev/docs/configuration}
7+
*/
8+
9+
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
10+
11+
/**
12+
* SvelteKit configuration object
13+
*
14+
* @type {import('@sveltejs/kit').Config}
15+
*/
16+
const config = {
17+
/**
18+
* Preprocessor configuration
19+
*
20+
* Uses Vite's preprocessor to handle TypeScript, PostCSS, and other transformations
21+
* before the Svelte compiler processes the components.
22+
*/
23+
preprocess: vitePreprocess(),
24+
};
25+
26+
export default config;

0 commit comments

Comments
 (0)