Files
Pake/bin/utils/dir.ts
Tw93 6f9450d598 beta
2025-08-16 22:37:08 +08:00

20 lines
486 B
TypeScript
Vendored

import path from 'path';
import os from 'os';
import { fileURLToPath } from 'url';
// Convert the current module URL to a file path
const currentModulePath = fileURLToPath(import.meta.url);
// Resolve the parent directory of the current module
export const npmDirectory = path.join(path.dirname(currentModulePath), '..');
export const tauriConfigDirectory = path.join(
npmDirectory,
'src-tauri',
'.pake',
);
export function getUserHomeDir(): string {
return os.homedir();
}