feat: use adapter-static and prerender everything

This commit is contained in:
Ax333l 2022-10-26 21:11:53 +02:00
parent 3bac5e0453
commit e7a34c2ae9
No known key found for this signature in database
GPG Key ID: D2B4D85271127D23
7 changed files with 131 additions and 1546 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
.DS_Store
node_modules
/build
/public
/.svelte-kit
/package
.env

1657
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,14 +5,15 @@
"dev": "vite dev",
"build": "vite build",
"package": "svelte-kit package",
"preview": "vite preview",
"preview": "sirv ./public --no-clear",
"vite:preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check --plugin-search-dir=. . && eslint .",
"format": "prettier --write --plugin-search-dir=. ."
},
"devDependencies": {
"@sveltejs/adapter-auto": "next",
"@sveltejs/adapter-static": "next",
"@sveltejs/kit": "next",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
@ -21,6 +22,7 @@
"eslint-plugin-svelte3": "^4.0.0",
"prettier": "^2.6.2",
"prettier-plugin-svelte": "^2.7.0",
"sirv-cli": "^2.0.2",
"svelte": "^3.44.0",
"svelte-check": "^2.7.1",
"svelte-preprocess": "^4.10.6",

View File

@ -2,6 +2,8 @@ import type { Repository } from 'src/data/types';
export type ContribData = { repositories: Repository[] };
export const prerender = true;
export async function load({
fetch
}): Promise<ContribData> {

View File

@ -48,8 +48,7 @@
<br />
<br />
<div class="button-wrapper">
<Button kind="secondary">Using ReVanced CLI and installing ReVanced -></Button
>
Using ReVanced CLI and installing ReVanced (Docs will be overhauled anyways)
</div>
</div>
</main>

View File

@ -1,4 +1,4 @@
import adapter from '@sveltejs/adapter-auto';
import adapter from '@sveltejs/adapter-static';
import preprocess from 'svelte-preprocess';
/** @type {import('@sveltejs/kit').Config} */
@ -8,7 +8,11 @@ const config = {
preprocess: preprocess(),
kit: {
adapter: adapter()
adapter: adapter({
pages: 'public',
}),
trailingSlash: 'always'
}
};