Skip to content

Commit cc1ba74

Browse files
authored
Add a user-friendly download page like OBS (#460)
1 parent f965cf2 commit cc1ba74

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

+4014
-0
lines changed

.github/workflows/pages.yaml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "Deploy pages to GitHub Pages"
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
8+
permissions:
9+
contents: "read"
10+
pages: "write"
11+
id-token: "write"
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
Deploy:
19+
environment:
20+
name: "github-pages"
21+
url: "${{ steps.deployment.outputs.page_url }}"
22+
runs-on: "ubuntu-latest"
23+
defaults:
24+
run:
25+
working-directory: "./pages"
26+
steps:
27+
- name: "Checkout"
28+
uses: "actions/checkout@v4"
29+
- name: "Setup Pages"
30+
uses: "actions/configure-pages@v3"
31+
with:
32+
static_site_generator: "sveltekit"
33+
- uses: "actions/setup-node@v3"
34+
with:
35+
node-version: 20
36+
cache: "npm"
37+
cache-dependency-path: "./pages/package-lock.json"
38+
- name: "Install dependencies"
39+
run: "npm install"
40+
- name: "Build pages"
41+
run: "npm run build"
42+
env:
43+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
44+
- name: "Upload artifact"
45+
uses: "actions/upload-pages-artifact@v2"
46+
with:
47+
path: "./pages/build"
48+
- name: "Deploy to GitHub Pages"
49+
id: "deployment"
50+
uses: "actions/deploy-pages@v2"

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
!/cmake
88
!/data
99
!/docs
10+
!/pages
1011
!/src
1112
!/vendor
1213
!.clang-format

pages/.eslintignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env
7+
.env.*
8+
!.env.example
9+
10+
# Ignore files for PNPM, NPM and YARN
11+
pnpm-lock.yaml
12+
package-lock.json
13+
yarn.lock

pages/.eslintrc.cjs

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
module.exports = {
2+
root: true,
3+
extends: [
4+
'eslint:recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'plugin:svelte/recommended',
7+
'prettier'
8+
],
9+
parser: '@typescript-eslint/parser',
10+
plugins: ['@typescript-eslint'],
11+
parserOptions: {
12+
sourceType: 'module',
13+
ecmaVersion: 2020,
14+
extraFileExtensions: ['.svelte']
15+
},
16+
env: {
17+
browser: true,
18+
es2017: true,
19+
node: true
20+
},
21+
overrides: [
22+
{
23+
files: ['*.svelte'],
24+
parser: 'svelte-eslint-parser',
25+
parserOptions: {
26+
parser: '@typescript-eslint/parser'
27+
}
28+
}
29+
]
30+
};

pages/.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env
7+
.env.*
8+
!.env.example
9+
.vercel
10+
.output
11+
vite.config.js.timestamp-*
12+
vite.config.ts.timestamp-*

pages/.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

pages/.prettierignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env
7+
.env.*
8+
!.env.example
9+
10+
# Ignore files for PNPM, NPM and YARN
11+
pnpm-lock.yaml
12+
package-lock.json
13+
yarn.lock

pages/.prettierrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"useTabs": true,
3+
"singleQuote": true,
4+
"trailingComma": "none",
5+
"printWidth": 100,
6+
"plugins": ["prettier-plugin-svelte"],
7+
"pluginSearchDirs": ["."],
8+
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
9+
}

pages/README.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# create-svelte
2+
3+
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
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+
npm create svelte@latest
12+
13+
# create a new project in my-app
14+
npm create svelte@latest 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://kit.svelte.dev/docs/adapters) for your target environment.

0 commit comments

Comments
 (0)