Skip to content

Commit

Permalink
add svelte kit example
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Hirter committed Aug 21, 2024
1 parent c9aef6f commit 4ebc7f1
Show file tree
Hide file tree
Showing 19 changed files with 3,565 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ fileignoreconfig:
checksum: 49b1eac3eeeda103edfa79332aabf552874ef6d1a848dd6a4725b6839fc2ff02
- filename: Examples/Docker/package-lock.json
checksum: 905628c992b4e9ebdc237623d6598860cea6f81e6d921a2028125b0a576f3f6e
- filename: Examples/JavaScript/SvelteKit/package-lock.json
checksum: 2b8b3be3c146331b2c76b5c98a8769d745351286560bb715e55c93b582923c84
version: ""
21 changes: 21 additions & 0 deletions Examples/JavaScript/SvelteKit/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
node_modules

# Output
.output
.vercel
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
1 change: 1 addition & 0 deletions Examples/JavaScript/SvelteKit/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
4 changes: 4 additions & 0 deletions Examples/JavaScript/SvelteKit/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
8 changes: 8 additions & 0 deletions Examples/JavaScript/SvelteKit/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
38 changes: 38 additions & 0 deletions Examples/JavaScript/SvelteKit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# create-svelte

Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/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.
23 changes: 23 additions & 0 deletions Examples/JavaScript/SvelteKit/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import js from '@eslint/js';
import svelte from 'eslint-plugin-svelte';
import prettier from 'eslint-config-prettier';
import globals from 'globals';

/** @type {import('eslint').Linter.Config[]} */
export default [
js.configs.recommended,
...svelte.configs['flat/recommended'],
prettier,
...svelte.configs['flat/prettier'],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
{
ignores: ['build/', '.svelte-kit/', 'dist/']
}
];
Loading

0 comments on commit 4ebc7f1

Please sign in to comment.