Bundle server assets into Tauri app build
This commit is contained in:
7
packages/tauri-app/.gitignore
vendored
Normal file
7
packages/tauri-app/.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
src-tauri/target
|
||||||
|
src-tauri/Cargo.lock
|
||||||
|
src-tauri/resources/
|
||||||
|
target
|
||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
.DS_Store
|
||||||
10
packages/tauri-app/package.json
Normal file
10
packages/tauri-app/package.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"name": "@codenomad/tauri-app",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"dev": "cargo tauri dev",
|
||||||
|
"prebuild": "npm run build --prefix ../server && rm -rf src-tauri/resources/server && mkdir -p src-tauri/resources/server && rsync -a ../server/dist ../server/public ../server/node_modules ../server/package.json src-tauri/resources/server/",
|
||||||
|
"build": "cargo tauri build"
|
||||||
|
}
|
||||||
|
}
|
||||||
44
packages/tauri-app/src-tauri/tauri.conf.json
Normal file
44
packages/tauri-app/src-tauri/tauri.conf.json
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
|
"productName": "CodeNomad",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"identifier": "ai.opencode.client",
|
||||||
|
"build": {
|
||||||
|
"beforeDevCommand": "",
|
||||||
|
"beforeBuildCommand": "npm run prebuild",
|
||||||
|
"frontendDist": "../src"
|
||||||
|
},
|
||||||
|
"app": {
|
||||||
|
"withGlobalTauri": true,
|
||||||
|
"windows": [
|
||||||
|
{
|
||||||
|
"label": "main",
|
||||||
|
"title": "CodeNomad",
|
||||||
|
"url": "index.html",
|
||||||
|
"width": 1400,
|
||||||
|
"height": 900,
|
||||||
|
"minWidth": 800,
|
||||||
|
"minHeight": 600,
|
||||||
|
"center": true,
|
||||||
|
"resizable": true,
|
||||||
|
"fullscreen": false,
|
||||||
|
"decorations": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"security": {
|
||||||
|
"assetProtocol": {
|
||||||
|
"scope": ["**"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bundle": {
|
||||||
|
"active": true,
|
||||||
|
"resources": [
|
||||||
|
"../src/index.html",
|
||||||
|
"../src/icon.png",
|
||||||
|
"resources/server"
|
||||||
|
],
|
||||||
|
"icon": ["icon.icns", "icon.ico", "icon.png"],
|
||||||
|
"targets": ["app"]
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user