mirror of
https://github.com/anomalyco/opencode.git
synced 2026-02-01 22:48:16 +00:00
fix: use ts project references for desktop and tauri
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -9,6 +9,7 @@ node_modules
|
||||
playground
|
||||
tmp
|
||||
dist
|
||||
ts-dist
|
||||
.turbo
|
||||
**/.serena
|
||||
.serena/
|
||||
|
||||
1
bun.lock
1
bun.lock
@@ -363,6 +363,7 @@
|
||||
"@actions/artifact": "4.0.0",
|
||||
"@tauri-apps/cli": "^2",
|
||||
"@types/bun": "catalog:",
|
||||
"@typescript/native-preview": "catalog:",
|
||||
"typescript": "~5.6.2",
|
||||
"vite": "catalog:",
|
||||
},
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
@@ -11,7 +12,9 @@
|
||||
"jsxImportSource": "solid-js",
|
||||
"allowJs": true,
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"noEmit": false,
|
||||
"emitDeclarationOnly": true,
|
||||
"outDir": "ts-dist",
|
||||
"isolatedModules": true,
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
"version": "1.0.137",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"typecheck": "tsgo -b",
|
||||
"predev": "bun ./scripts/predev.ts",
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
"build": "bun run typecheck && vite build",
|
||||
"preview": "vite preview",
|
||||
"tauri": "tauri"
|
||||
},
|
||||
@@ -24,6 +25,7 @@
|
||||
"@actions/artifact": "4.0.0",
|
||||
"@tauri-apps/cli": "^2",
|
||||
"@types/bun": "catalog:",
|
||||
"@typescript/native-preview": "catalog:",
|
||||
"typescript": "~5.6.2",
|
||||
"vite": "catalog:"
|
||||
}
|
||||
|
||||
@@ -13,10 +13,17 @@ if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
|
||||
|
||||
const platform: Platform = {}
|
||||
|
||||
render(() => {
|
||||
onMount(() => {
|
||||
if (window.__OPENCODE__.updaterEnabled) runUpdater()
|
||||
})
|
||||
declare global {
|
||||
interface Window {
|
||||
__OPENCODE__?: { updaterEnabled?: boolean }
|
||||
}
|
||||
}
|
||||
|
||||
render(
|
||||
() => {
|
||||
onMount(() => {
|
||||
if(window.__OPENCODE__?.updaterEnabled) runUpdater();
|
||||
});
|
||||
|
||||
return (
|
||||
<PlatformProvider value={platform}>
|
||||
|
||||
@@ -1,26 +1,8 @@
|
||||
{
|
||||
"extends": "../desktop/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"module": "ESNext",
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
"jsx": "preserve",
|
||||
"jsxImportSource": "solid-js"
|
||||
"outDir": "ts-dist"
|
||||
},
|
||||
"references": [{ "path": "../desktop" }],
|
||||
"include": ["src"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user