perf: optimize app startup and background lifecycles

This commit is contained in:
inman
2026-08-19 00:56:15 +08:00
parent 31332f6d76
commit 927e13349b
121 changed files with 4359 additions and 1400 deletions

View File

@@ -4,6 +4,7 @@ import { createRequire } from 'node:module';
import {
mkdir,
mkdtemp,
realpath,
readFile,
rename,
rm,
@@ -74,7 +75,7 @@ async function createProject(projectType: ProjectType = 'mini_game'): Promise<st
await writeFile(join(projectPath, 'index.html'), '<div id="app"></div>', 'utf8');
await writeFile(join(projectPath, 'src', 'main.ts'), 'console.log("ready")\n', 'utf8');
await writeFile(join(projectPath, 'public', 'icon.txt'), 'icon\n', 'utf8');
return projectPath;
return await realpath(projectPath);
}
afterEach(async () => {