aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/examples/with-svelte/apps/docs
diff options
context:
space:
mode:
author简律纯 <hsiangnianian@outlook.com>2023-04-28 01:47:57 +0800
committer简律纯 <hsiangnianian@outlook.com>2023-04-28 01:47:57 +0800
commit8b2c4a38a461ff5ecc95972291bc711e2c5dec9a (patch)
tree29f552e3df949073e21bf5c76d7abc3044830ec6 /examples/with-svelte/apps/docs
parentfc8c5fdce62fb229202659408798a7b6c98f6e8b (diff)
downloadHydroRoll-8b2c4a38a461ff5ecc95972291bc711e2c5dec9a.tar.gz
HydroRoll-8b2c4a38a461ff5ecc95972291bc711e2c5dec9a.zip
Diffstat (limited to 'examples/with-svelte/apps/docs')
-rw-r--r--examples/with-svelte/apps/docs/.eslintignore13
-rw-r--r--examples/with-svelte/apps/docs/.eslintrc.cjs4
-rw-r--r--examples/with-svelte/apps/docs/.gitignore8
-rw-r--r--examples/with-svelte/apps/docs/README.md38
-rw-r--r--examples/with-svelte/apps/docs/package.json29
-rw-r--r--examples/with-svelte/apps/docs/src/app.d.ts11
-rw-r--r--examples/with-svelte/apps/docs/src/app.html12
-rw-r--r--examples/with-svelte/apps/docs/src/routes/+page.svelte8
-rw-r--r--examples/with-svelte/apps/docs/static/favicon.pngbin0 -> 1571 bytes
-rw-r--r--examples/with-svelte/apps/docs/svelte.config.js15
-rw-r--r--examples/with-svelte/apps/docs/tsconfig.json13
-rw-r--r--examples/with-svelte/apps/docs/vite.config.js8
12 files changed, 159 insertions, 0 deletions
diff --git a/examples/with-svelte/apps/docs/.eslintignore b/examples/with-svelte/apps/docs/.eslintignore
new file mode 100644
index 0000000..3897265
--- /dev/null
+++ b/examples/with-svelte/apps/docs/.eslintignore
@@ -0,0 +1,13 @@
+.DS_Store
+node_modules
+/build
+/.svelte-kit
+/package
+.env
+.env.*
+!.env.example
+
+# Ignore files for PNPM, NPM and YARN
+pnpm-lock.yaml
+package-lock.json
+yarn.lock
diff --git a/examples/with-svelte/apps/docs/.eslintrc.cjs b/examples/with-svelte/apps/docs/.eslintrc.cjs
new file mode 100644
index 0000000..6809c96
--- /dev/null
+++ b/examples/with-svelte/apps/docs/.eslintrc.cjs
@@ -0,0 +1,4 @@
+module.exports = {
+ root: true,
+ extends: ['custom']
+};
diff --git a/examples/with-svelte/apps/docs/.gitignore b/examples/with-svelte/apps/docs/.gitignore
new file mode 100644
index 0000000..f4401a3
--- /dev/null
+++ b/examples/with-svelte/apps/docs/.gitignore
@@ -0,0 +1,8 @@
+.DS_Store
+node_modules
+/build
+/.svelte-kit
+/package
+.env
+.env.*
+!.env.example
diff --git a/examples/with-svelte/apps/docs/README.md b/examples/with-svelte/apps/docs/README.md
new file mode 100644
index 0000000..374efec
--- /dev/null
+++ b/examples/with-svelte/apps/docs/README.md
@@ -0,0 +1,38 @@
+# create-svelte
+
+Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/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 init svelte
+
+# create a new project in my-app
+npm init svelte 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.
diff --git a/examples/with-svelte/apps/docs/package.json b/examples/with-svelte/apps/docs/package.json
new file mode 100644
index 0000000..6e633e9
--- /dev/null
+++ b/examples/with-svelte/apps/docs/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "docs",
+ "version": "0.0.0",
+ "scripts": {
+ "dev": "vite dev --port 3001 --open",
+ "build": "vite build",
+ "package": "vite package",
+ "preview": "vite preview",
+ "check": "svelte-check --tsconfig ./tsconfig.json",
+ "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
+ "lint": "prettier --check --ignore-path=../../.prettierignore . && eslint \"src\"",
+ "format": "prettier --write --ignore-path=../../.prettierignore ."
+ },
+ "dependencies": {
+ "ui": "workspace:*"
+ },
+ "devDependencies": {
+ "@sveltejs/adapter-auto": "latest",
+ "@sveltejs/kit": "latest",
+ "eslint-config-custom": "workspace:*",
+ "svelte": "^3.44.0",
+ "svelte-check": "^2.7.1",
+ "svelte-preprocess": "^4.10.6",
+ "tslib": "^2.3.1",
+ "typescript": "^4.7.2",
+ "vite": "^4.0.0"
+ },
+ "type": "module"
+}
diff --git a/examples/with-svelte/apps/docs/src/app.d.ts b/examples/with-svelte/apps/docs/src/app.d.ts
new file mode 100644
index 0000000..f201c93
--- /dev/null
+++ b/examples/with-svelte/apps/docs/src/app.d.ts
@@ -0,0 +1,11 @@
+/// <reference types="@sveltejs/kit" />
+
+// See https://kit.svelte.dev/docs/types#app
+// for information about these interfaces
+// and what to do when importing types
+declare namespace App {
+ // interface Locals {}
+ // interface Platform {}
+ // interface Session {}
+ // interface Stuff {}
+}
diff --git a/examples/with-svelte/apps/docs/src/app.html b/examples/with-svelte/apps/docs/src/app.html
new file mode 100644
index 0000000..5c77cd7
--- /dev/null
+++ b/examples/with-svelte/apps/docs/src/app.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <link rel="icon" href="%sveltekit.assets%/favicon.png" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ %sveltekit.head%
+ </head>
+ <body>
+ <div>%sveltekit.body%</div>
+ </body>
+</html>
diff --git a/examples/with-svelte/apps/docs/src/routes/+page.svelte b/examples/with-svelte/apps/docs/src/routes/+page.svelte
new file mode 100644
index 0000000..078e979
--- /dev/null
+++ b/examples/with-svelte/apps/docs/src/routes/+page.svelte
@@ -0,0 +1,8 @@
+<script lang="ts">
+ import { MyCounterButton } from 'ui';
+</script>
+
+<h1>Docs</h1>
+<MyCounterButton />
+
+<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
diff --git a/examples/with-svelte/apps/docs/static/favicon.png b/examples/with-svelte/apps/docs/static/favicon.png
new file mode 100644
index 0000000..825b9e6
--- /dev/null
+++ b/examples/with-svelte/apps/docs/static/favicon.png
Binary files differ
diff --git a/examples/with-svelte/apps/docs/svelte.config.js b/examples/with-svelte/apps/docs/svelte.config.js
new file mode 100644
index 0000000..23f07d2
--- /dev/null
+++ b/examples/with-svelte/apps/docs/svelte.config.js
@@ -0,0 +1,15 @@
+import adapter from '@sveltejs/adapter-auto';
+import preprocess from 'svelte-preprocess';
+
+/** @type {import('@sveltejs/kit').Config} */
+const config = {
+ // Consult https://github.com/sveltejs/svelte-preprocess
+ // for more information about preprocessors
+ preprocess: preprocess(),
+
+ kit: {
+ adapter: adapter()
+ }
+};
+
+export default config;
diff --git a/examples/with-svelte/apps/docs/tsconfig.json b/examples/with-svelte/apps/docs/tsconfig.json
new file mode 100644
index 0000000..5c56cee
--- /dev/null
+++ b/examples/with-svelte/apps/docs/tsconfig.json
@@ -0,0 +1,13 @@
+{
+ "extends": "./.svelte-kit/tsconfig.json",
+ "compilerOptions": {
+ "allowJs": true,
+ "checkJs": true,
+ "esModuleInterop": true,
+ "forceConsistentCasingInFileNames": true,
+ "resolveJsonModule": true,
+ "skipLibCheck": true,
+ "sourceMap": true,
+ "strict": true
+ }
+}
diff --git a/examples/with-svelte/apps/docs/vite.config.js b/examples/with-svelte/apps/docs/vite.config.js
new file mode 100644
index 0000000..096c206
--- /dev/null
+++ b/examples/with-svelte/apps/docs/vite.config.js
@@ -0,0 +1,8 @@
+import { sveltekit } from '@sveltejs/kit/vite';
+
+/** @type {import('vite').UserConfig} */
+const config = {
+ plugins: [sveltekit()]
+};
+
+export default config;