Skip to content

Commit eb05bc8

Browse files
authored
Arackis/add demo project fix reactive disabled (#154)
* installs * re-gen demo project * Set up demo project * tweak default prop values * demo tweaks * make disabled prop reactive * add prettierrc with config values matching what's there already * Revert "add prettierrc with config values matching what's there already" This reverts commit f7bdd8c. * Revert "make disabled prop reactive" This reverts commit 7d4b1cc. * Revert "Revert "add prettierrc with config values matching what's there already"" This reverts commit 3de9b65. * Revert "Revert "make disabled prop reactive"" This reverts commit cb24fd6. * fix demo pages
1 parent 8395738 commit eb05bc8

Some content is hidden

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

42 files changed

+234
-2420
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
node_modules
22
dist
33
storybook-static
4-
.svelte-kit
4+
package-lock.json
5+
.DS_Store
6+
.svelte-kit

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"useTabs": false,
3+
"singleQuote": false,
4+
"trailingComma": "none",
5+
"printWidth": 100,
6+
"plugins": ["prettier-plugin-svelte"],
7+
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }],
8+
"arrowParens": "avoid"
9+
}
10+

examples/sveltekit-js/.gitignore renamed to demo/.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ node_modules
66
.env
77
.env.*
88
!.env.example
9-
.vercel
10-
.output
9+
vite.config.js.timestamp-*
10+
vite.config.ts.timestamp-*
File renamed without changes.

demo/.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Ignore files for PNPM, NPM and YARN
2+
pnpm-lock.yaml
3+
package-lock.json
4+
yarn.lock

demo/.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"useTabs": true,
3+
"singleQuote": true,
4+
"trailingComma": "none",
5+
"printWidth": 100,
6+
"plugins": ["prettier-plugin-svelte"],
7+
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
8+
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
# create-svelte
22

3-
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte);
3+
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
44

55
## Creating a project
66

77
If you're seeing this, you've probably already done this step. Congrats!
88

99
```bash
1010
# create a new project in the current directory
11-
npm init svelte@next
11+
npm create svelte@latest
1212

1313
# create a new project in my-app
14-
npm init svelte@next my-app
14+
npm create svelte@latest my-app
1515
```
1616

17-
> Note: the `@next` is temporary
18-
1917
## Developing
2018

2119
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
@@ -29,10 +27,12 @@ npm run dev -- --open
2927

3028
## Building
3129

32-
Before creating a production version of your app, install an [adapter](https://kit.svelte.dev/docs#adapters) for your target environment. Then:
30+
To create a production version of your app:
3331

3432
```bash
3533
npm run build
3634
```
3735

38-
> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.
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://kit.svelte.dev/docs/adapters) for your target environment.

demo/package.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "demo",
3+
"version": "0.0.1",
4+
"private": true,
5+
"scripts": {
6+
"dev": "vite dev",
7+
"build": "vite build",
8+
"preview": "vite preview",
9+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
10+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
11+
"test": "vitest",
12+
"lint": "prettier --check .",
13+
"format": "prettier --write ."
14+
},
15+
"devDependencies": {
16+
"@sveltejs/adapter-auto": "^3.0.0",
17+
"@sveltejs/kit": "^2.0.0",
18+
"@sveltejs/vite-plugin-svelte": "^3.0.0",
19+
"prettier": "^3.1.1",
20+
"prettier-plugin-svelte": "^3.1.2",
21+
"svelte": "^4.2.7",
22+
"svelte-check": "^3.6.0",
23+
"tslib": "^2.4.1",
24+
"typescript": "^5.0.0",
25+
"vite": "^5.0.3",
26+
"vitest": "^1.0.0"
27+
},
28+
"type": "module"
29+
}

demo/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://kit.svelte.dev/docs/types#app
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 {};

demo/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+
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
%sveltekit.head%
8+
</head>
9+
<body data-sveltekit-preload-data="hover">
10+
<div style="display: contents">%sveltekit.body%</div>
11+
</body>
12+
</html>

0 commit comments

Comments
 (0)