WIP: Themes v2 #24

Draft
HorizonCode wants to merge 71 commits from themes-v2 into master
pull from: themes-v2
2 changed files with 0 additions and 41 deletions
Showing only changes of commit cb117826c7 - Show all commits

No files matched your search

-1
View File
@@ -5,7 +5,6 @@
"type": "module",
"scripts": {
"debug": "bun run tauri dev",
"build": "bun ./scripts/build.ts",
"release": "bun ./scripts/release.ts",
"release:macos": "bun ./scripts/release.ts macos",
"release:windows": "bun ./scripts/release.ts windows",
-40
View File
@@ -1,40 +0,0 @@
import { spawn } from 'child_process';
function runVite(): Promise<void> {
return new Promise((resolve, reject) => {
const proc = spawn('bunx', ['--bun', 'vite', 'build'], { stdio: ['inherit', 'pipe', 'pipe'] });
proc.stdout?.on('data', (data: Buffer) => {
process.stdout.write(data);
if (data.toString().includes('✔ done')) {
setTimeout(() => {
proc.kill();
resolve();
}, 500);
}
});
proc.stderr?.on('data', (data: Buffer) => process.stderr.write(data));
proc.on('close', (code) => {
if (code === 0 || code === null) resolve();
else reject(new Error(`vite build exited with code ${code}`));
});
});
}
function run(cmd: string, args: string[]): Promise<void> {
return new Promise((resolve, reject) => {
const proc = spawn(cmd, args, { stdio: 'inherit' });
proc.on('close', (code) => {
if (code === 0) resolve();
else reject(new Error(`${cmd} exited with code ${code}`));
});
});
}
await run('bun', ['./scripts/sync-version.ts']);
await runVite();
//set NO_STRIP=1 in env for linux to prevent stripping of debug symbols in tauri builds, which causes issues with source maps
if (process.platform === 'linux') process.env.NO_STRIP = '1';
await run('bunx', ['tauri', 'build']);