File size: 444 Bytes
e1ae2c6
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 生成端薄入口:保持对外导出稳定,内部实现位于 src/generator/main.js
const impl = require('./generator/main');
const { wrapAsyncError } = require('./generator/utils/errors');

module.exports = impl;

if (require.main === module) {
  if (typeof impl.main === 'function') {
    wrapAsyncError(impl.main)();
  } else {
    console.error('generator main() 未导出,无法直接执行。');
    process.exitCode = 1;
  }
}