update: 完善开发模式

This commit is contained in:
jeasonnow
2023-07-14 22:14:01 +08:00
parent a597af490d
commit 3c7e7f6acc
9 changed files with 103 additions and 26 deletions

4
bin/utils/dir.ts vendored
View File

@@ -5,4 +5,6 @@ import { fileURLToPath } from 'url';
const currentModulePath = fileURLToPath(import.meta.url);
// Resolve the parent directory of the current module
export const npmDirectory = process.env.DEV === 'true' ? process.cwd() : path.join(path.dirname(currentModulePath), '..');
export const npmDirectory = path.join(path.dirname(currentModulePath), '..');
export const tauriConfigDirectory = process.env.NODE_ENV === 'development' ? path.join(npmDirectory, 'src-tauri', '.pake') : path.join(npmDirectory, 'src-tauri');