You've already forked AstralRinth
forked from didirus/AstralRinth
Make Theseus compilable out of the box again, update Tauri to 1.0.4
Changes made: - migrate to Vite 3 (Svelte Kit errors out and forces you to migrate) - bumped unplugin-icons to 0.14.7 (Vite 3 support) - disable strict-peer-dependencies (changes needed in omorphia - unplugin-icons there requires Vite 2) - bumped Tauri to 1.0.4 (finally stable!) - removed useBootstrapper (removed in v1.0.0-rc.5) - migrated from create_window to setup (removed in v1.0.0-rc.7) - replaced %svelte% with %sveltekit% (renamed in SvelteKit 1.0.0-next.339) Notes: - Vite 3 exposes its dev server on port 5173.
This commit is contained in:
1
.idea/theseus.iml
generated
1
.idea/theseus.iml
generated
@@ -47,6 +47,7 @@
|
|||||||
<sourceFolder url="file://$MODULE_DIR$/target/debug/build/crossbeam-utils-bab62be590a5955d/out" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/target/debug/build/crossbeam-utils-bab62be590a5955d/out" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/target/debug/build/memoffset-235ac8b3550fb50a/out" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/target/debug/build/memoffset-235ac8b3550fb50a/out" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/theseus/examples" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/theseus/examples" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/theseus_gui/src-tauri/src" isTestSource="false" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/theseus_gui/.svelte-kit" />
|
<excludeFolder url="file://$MODULE_DIR$/theseus_gui/.svelte-kit" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/theseus_gui/build" />
|
<excludeFolder url="file://$MODULE_DIR$/theseus_gui/build" />
|
||||||
|
|||||||
679
Cargo.lock
generated
679
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1 +1,2 @@
|
|||||||
engine-strict=true
|
engine-strict=true
|
||||||
|
strict-peer-dependencies=false
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tauri dev",
|
"dev": "tauri dev",
|
||||||
"dev:web": "svelte-kit dev",
|
"dev:web": "vite",
|
||||||
"kill:web": "kill-port 3000",
|
"kill:web": "kill-port 5173",
|
||||||
"tauri": "tauri",
|
"tauri": "tauri",
|
||||||
"build": "tauri build",
|
"build": "tauri build",
|
||||||
"build:web": "svelte-kit build",
|
"build:web": "vite build",
|
||||||
"test": "cargo ../test --manifest-path ./src-tauri/Cargo.toml",
|
"test": "cargo ../test --manifest-path ./src-tauri/Cargo.toml",
|
||||||
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. src",
|
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. src",
|
||||||
"check": "cargo check --manifest-path src-tauri/Cargo.toml && svelte-check --tsconfig ./tsconfig.json"
|
"check": "cargo check --manifest-path src-tauri/Cargo.toml && svelte-check --tsconfig ./tsconfig.json"
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/adapter-static": "next",
|
"@sveltejs/adapter-static": "next",
|
||||||
"@sveltejs/kit": "next",
|
"@sveltejs/kit": "next",
|
||||||
"@tauri-apps/cli": "^1.0.0-rc.5",
|
"@tauri-apps/cli": "^1.0.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.10.1",
|
"@typescript-eslint/eslint-plugin": "^5.10.1",
|
||||||
"@typescript-eslint/parser": "^5.10.1",
|
"@typescript-eslint/parser": "^5.10.1",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
@@ -25,7 +25,8 @@
|
|||||||
"svelte": "^3.46.0",
|
"svelte": "^3.46.0",
|
||||||
"svelte-check": "^2.2.6",
|
"svelte-check": "^2.2.6",
|
||||||
"tslib": "^2.3.1",
|
"tslib": "^2.3.1",
|
||||||
"typescript": "~4.5.4"
|
"typescript": "~4.5.4",
|
||||||
|
"vite": "^3.0.0"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -37,6 +38,6 @@
|
|||||||
"@tauri-apps/api": "^1.0.0-rc.1",
|
"@tauri-apps/api": "^1.0.0-rc.1",
|
||||||
"omorphia": "0.0.17",
|
"omorphia": "0.0.17",
|
||||||
"svrollbar": "^0.10.4",
|
"svrollbar": "^0.10.4",
|
||||||
"unplugin-icons": "^0.13.2"
|
"unplugin-icons": "^0.14.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1854
theseus_gui/pnpm-lock.yaml
generated
1854
theseus_gui/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -8,12 +8,12 @@ rust-version = "1.57"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tauri-build = { version = "1.0.0-rc.3", features = [] }
|
tauri-build = { version = "1.0.4", features = [] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
tauri = { version = "1.0.0-rc.3", features = ["api-all"] }
|
tauri = { version = "1.0.4", features = ["api-all"] }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# by default Tauri runs in production mode
|
# by default Tauri runs in production mode
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ fn main() {
|
|||||||
|
|
||||||
tauri::Builder::default()
|
tauri::Builder::default()
|
||||||
.invoke_handler(tauri::generate_handler![])
|
.invoke_handler(tauri::generate_handler![])
|
||||||
.create_window("main", WindowUrl::default(), |win, webview| {
|
.setup(|app| {
|
||||||
let win = win
|
let _win = WindowBuilder::new(app, "main", WindowUrl::default())
|
||||||
.title("Modrinth")
|
.title("Modrinth")
|
||||||
.resizable(true)
|
.resizable(true)
|
||||||
.decorations(true)
|
.decorations(true)
|
||||||
@@ -22,8 +22,9 @@ fn main() {
|
|||||||
.inner_size(800.0, 550.0)
|
.inner_size(800.0, 550.0)
|
||||||
.min_inner_size(400.0, 200.0)
|
.min_inner_size(400.0, 200.0)
|
||||||
.skip_taskbar(false)
|
.skip_taskbar(false)
|
||||||
.fullscreen(false);
|
.fullscreen(false)
|
||||||
return (win, webview);
|
.build()?;
|
||||||
|
Ok(())
|
||||||
})
|
})
|
||||||
.menu(Menu::with_items([
|
.menu(Menu::with_items([
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"distDir": "../build",
|
"distDir": "../build",
|
||||||
"devPath": "http://localhost:3000",
|
"devPath": "http://localhost:5173",
|
||||||
"beforeDevCommand": "pnpm dev:web",
|
"beforeDevCommand": "pnpm dev:web",
|
||||||
"beforeBuildCommand": "pnpm run build:web"
|
"beforeBuildCommand": "pnpm run build:web"
|
||||||
},
|
},
|
||||||
@@ -32,13 +32,11 @@
|
|||||||
"shortDescription": "",
|
"shortDescription": "",
|
||||||
"longDescription": "",
|
"longDescription": "",
|
||||||
"deb": {
|
"deb": {
|
||||||
"depends": [],
|
"depends": []
|
||||||
"useBootstrapper": false
|
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
"minimumSystemVersion": "",
|
||||||
"useBootstrapper": false,
|
|
||||||
"exceptionDomain": "",
|
"exceptionDomain": "",
|
||||||
"signingIdentity": null,
|
"signingIdentity": null,
|
||||||
"providerShortName": null,
|
"providerShortName": null,
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
%svelte.head%
|
%sveltekit.head%
|
||||||
</head>
|
</head>
|
||||||
<body style="background-color: hsl(220, 13%, 15%)">
|
<body style="background-color: hsl(220, 13%, 15%)">
|
||||||
%svelte.body%
|
%sveltekit.body%
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import adapter from '@sveltejs/adapter-static';
|
import adapter from '@sveltejs/adapter-static';
|
||||||
import path from "path";
|
import { preprocess } from 'omorphia/config/svelte.config'
|
||||||
import { preprocess, plugins } from 'omorphia/config/svelte.config'
|
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
const config = {
|
const config = {
|
||||||
@@ -8,23 +7,7 @@ const config = {
|
|||||||
kit: {
|
kit: {
|
||||||
adapter: adapter({
|
adapter: adapter({
|
||||||
fallback: '200.html',
|
fallback: '200.html',
|
||||||
}),
|
})
|
||||||
vite: {
|
|
||||||
plugins: [
|
|
||||||
...plugins,
|
|
||||||
],
|
|
||||||
resolve: {
|
|
||||||
alias: {
|
|
||||||
$assets: path.resolve('./src/assets'),
|
|
||||||
$components: path.resolve('./src/components'),
|
|
||||||
$layout: path.resolve('./src/layout'),
|
|
||||||
$lib: path.resolve('./src/lib'),
|
|
||||||
$stores: path.resolve('./src/stores'),
|
|
||||||
$styles: path.resolve('./src/styles'),
|
|
||||||
$generated: path.resolve('./src/generated'),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
24
theseus_gui/vite.config.js
Normal file
24
theseus_gui/vite.config.js
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
import { sveltekit } from '@sveltejs/kit/vite';
|
||||||
|
import path from "path";
|
||||||
|
import { plugins } from 'omorphia/config/svelte.config'
|
||||||
|
|
||||||
|
/** @type {import('vite').UserConfig} */
|
||||||
|
const config = {
|
||||||
|
plugins: [
|
||||||
|
sveltekit(),
|
||||||
|
...plugins
|
||||||
|
],
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
$assets: path.resolve('./src/assets'),
|
||||||
|
$components: path.resolve('./src/components'),
|
||||||
|
$layout: path.resolve('./src/layout'),
|
||||||
|
$lib: path.resolve('./src/lib'),
|
||||||
|
$stores: path.resolve('./src/stores'),
|
||||||
|
$styles: path.resolve('./src/styles'),
|
||||||
|
$generated: path.resolve('./src/generated'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
Reference in New Issue
Block a user