Skip to content

Commit cadc9a2

Browse files
committed
docs: add demo site
1 parent 5bdc5e0 commit cadc9a2

File tree

15 files changed

+2431
-0
lines changed

15 files changed

+2431
-0
lines changed

.github/workflows/deploy-demo.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
- name: Install Node.js
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: 22
16+
cache: npm
17+
- name: Install dependencies
18+
run: npm i && cd demo && npm i
19+
- name: Build lib
20+
run: npm run build
21+
- name: Build site
22+
env:
23+
BASE_PATH: '/${{ github.event.repository.name }}'
24+
run: cd demo && npm run build
25+
- name: Upload Artifacts
26+
uses: actions/upload-pages-artifact@v3
27+
with:
28+
path: 'demo/build/'
29+
30+
deploy:
31+
needs: build
32+
runs-on: ubuntu-latest
33+
permissions:
34+
pages: write
35+
id-token: write
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deployment.outputs.page_url }}
39+
steps:
40+
- name: Deploy
41+
id: deployment
42+
uses: actions/deploy-pages@v4

demo/.gitignore

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

demo/.npmrc

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

demo/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.

0 commit comments

Comments
 (0)