mixone
Version:
MixOne is a Node scaffolding tool implemented based on Vite, used for compiling HTML5, JavasCript, Vue, React and other codes. It supports packaging Web applications with multiple HTML entry points (BS architecture) and desktop installation packages (CS a
17 lines • 486 B
text/typescript
// @mainProcess
export async function monitorCPU() {
// @ts-ignore
const initial = os.cpus();
return 'initial2:' + initial;
}
// 这是会被编译进入主进程的
export async function getDocumentsPath() {
try {
// @ts-ignore
let path = await Main.app.getPath('documents');
console.log('Selected getDocumentsPath2:', path);
return path; // 返回路径给调用方
} catch (error) {
console.error('getDocumentsPath失败:', error);
}
}