mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
包成 main 函数对齐 check-i18n 风格 #3397
评审偏好。脚本执行逻辑挪进 main() 再调用,与 scripts/check-i18n.js 顶层结构对齐,行为不变。
This commit is contained in:
parent
08c573a542
commit
f943ab5fe4
1 changed files with 13 additions and 9 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
|
function main() {
|
||||||
const target = path.resolve(__dirname, '..', 'node_modules', 'v-code-diff', 'package.json');
|
const target = path.resolve(__dirname, '..', 'node_modules', 'v-code-diff', 'package.json');
|
||||||
|
|
||||||
if (!fs.existsSync(target)) {
|
if (!fs.existsSync(target)) {
|
||||||
|
|
@ -12,3 +13,6 @@ if (!fs.existsSync(target)) {
|
||||||
);
|
);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
main();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue