Skip to content

Commit 1317d1b

Browse files
committed
Adding in the docs
1 parent fb23efc commit 1317d1b

File tree

300 files changed

+22933
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

300 files changed

+22933
-0
lines changed

docs/.gitignore

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

docs/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

docs/.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Package Managers
2+
package-lock.json
3+
pnpm-lock.yaml
4+
yarn.lock

docs/.prettierrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"useTabs": false,
3+
"trailingComma": "none",
4+
"printWidth": 100,
5+
"tabWidth": 4,
6+
"semi": false,
7+
"singleQuote": true,
8+
"plugins": [
9+
"prettier-plugin-svelte",
10+
"prettier-plugin-organize-imports",
11+
"prettier-plugin-tailwindcss"
12+
],
13+
"overrides": [
14+
{
15+
"files": "*.svelte",
16+
"options": {
17+
"parser": "svelte"
18+
}
19+
}
20+
]
21+
}

docs/README.md

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

docs/components.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://next.shadcn-svelte.com/schema.json",
3+
"style": "default",
4+
"tailwind": {
5+
"config": "tailwind.config.ts",
6+
"css": "src/app.css",
7+
"baseColor": "zinc"
8+
},
9+
"aliases": {
10+
"components": "$lib/shadcn/components",
11+
"utils": "$lib/shadcn/utils",
12+
"ui": "$lib/shadcn/components/ui",
13+
"hooks": "$lib/shadcn/hooks"
14+
},
15+
"typescript": true,
16+
"registry": "https://next.shadcn-svelte.com/registry"
17+
}

docs/e2e/demo.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { expect, test } from '@playwright/test'
2+
3+
test('home page has expected h1', async ({ page }) => {
4+
await page.goto('/')
5+
await expect(page.locator('h1')).toBeVisible()
6+
})

docs/eslint.config.mjs

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
import { includeIgnoreFile } from '@eslint/compat'
2+
import js from '@eslint/js'
3+
import prettier from 'eslint-config-prettier'
4+
import svelte from 'eslint-plugin-svelte'
5+
import globals from 'globals'
6+
import { fileURLToPath } from 'node:url'
7+
import ts from 'typescript-eslint'
8+
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url))
9+
10+
export default [
11+
includeIgnoreFile(gitignorePath),
12+
{
13+
ignores: [
14+
'**/.DS_Store',
15+
'**/node_modules',
16+
'postcss.config.cjs',
17+
'**/build',
18+
'.svelte-kit',
19+
'package',
20+
'**/.env',
21+
'**/.env.*',
22+
'!**/.env.example',
23+
'**/pnpm-lock.yaml',
24+
'**/package-lock.json',
25+
'**/yarn.lock',
26+
'src/routes/poc',
27+
'**/dist',
28+
'vite.config.ts.*'
29+
]
30+
},
31+
js.configs.recommended,
32+
...ts.configs.recommended,
33+
...svelte.configs['flat/recommended'],
34+
prettier,
35+
...svelte.configs['flat/prettier'],
36+
{
37+
languageOptions: {
38+
globals: {
39+
...globals.browser,
40+
...globals.node
41+
}
42+
},
43+
44+
rules: {
45+
semi: ['warn', 'never'],
46+
quotes: ['error', 'single'],
47+
'dot-location': ['warn', 'property'],
48+
'guard-for-in': ['warn'],
49+
'no-multi-spaces': ['warn'],
50+
yoda: ['warn', 'never'],
51+
camelcase: ['error'],
52+
'comma-style': ['warn'],
53+
'comma-dangle': ['off', 'always-multiline'],
54+
'block-spacing': ['warn'],
55+
'keyword-spacing': ['warn'],
56+
'no-trailing-spaces': ['warn'],
57+
'no-unneeded-ternary': ['warn'],
58+
'no-whitespace-before-property': ['warn'],
59+
'object-curly-spacing': ['warn', 'always'],
60+
'space-before-blocks': ['warn'],
61+
'space-in-parens': ['warn'],
62+
'arrow-spacing': ['warn'],
63+
'no-duplicate-imports': ['error'],
64+
'no-var': ['error'],
65+
'prefer-const': ['error'],
66+
67+
'no-unused-vars': [
68+
'warn',
69+
{
70+
argsIgnorePattern: '^_',
71+
ignoreRestSiblings: true
72+
}
73+
],
74+
'@typescript-eslint/no-unused-expressions': [
75+
'error',
76+
{
77+
allowShortCircuit: true,
78+
allowTernary: true,
79+
allowTaggedTemplates: true
80+
}
81+
]
82+
}
83+
},
84+
{
85+
files: ['**/*.svelte'],
86+
languageOptions: {
87+
parserOptions: {
88+
parser: ts.parser
89+
}
90+
}
91+
},
92+
{
93+
/* location of your components where you would like to apply these rules */
94+
files: ['**/shadcn/components/ui/**/*.svelte', '**/shadcn/components/ui/**/*.ts'],
95+
languageOptions: {
96+
parserOptions: {
97+
parser: ts.parser
98+
}
99+
},
100+
rules: {
101+
'@typescript-eslint/no-unused-vars': [
102+
'warn',
103+
{
104+
argsIgnorePattern: '^_',
105+
varsIgnorePattern: '^\\$\\$(Props|Events|Slots|Generic)$'
106+
}
107+
],
108+
'prefer-const': ['off'],
109+
'no-unused-vars': ['off']
110+
}
111+
}
112+
]

0 commit comments

Comments
 (0)