mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
refactror: cpmoudle
此处非NC运行时的代码 用于打包时运行
This commit is contained in:
parent
ab22b775f1
commit
948cf5cca6
@ -3,8 +3,6 @@ import path from 'node:path';
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import { dirname } from 'node:path';
|
import { dirname } from 'node:path';
|
||||||
import { fileURLToPath } from 'node:url';
|
import { fileURLToPath } from 'node:url';
|
||||||
import { logError } from './log';
|
|
||||||
|
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
const __dirname = dirname(__filename);
|
const __dirname = dirname(__filename);
|
||||||
@ -20,6 +18,6 @@ export function cpModule(moduleName: string) {
|
|||||||
try {
|
try {
|
||||||
fs.copyFileSync(path.join(currentDir, fileName), path.join(currentDir, `${moduleName}.node`));
|
fs.copyFileSync(path.join(currentDir, fileName), path.join(currentDir, `${moduleName}.node`));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logError(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user