Skip to content

Commit dc51693

Browse files
committed
⚡ 增加部分功能.
1 parent 0103a94 commit dc51693

File tree

13 files changed

+771
-6397
lines changed

13 files changed

+771
-6397
lines changed

bin/base.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
'use strict';
22

3+
const checker = require('../src/utils/checker');
4+
if (!checker.checkNode()) {
5+
process.exit(1);
6+
}
7+
checker.checkUpgrade();
8+
39
const yParser = require('yargs-parser');
410
const cmd = process.argv[2];
511
const argv = yParser(process.argv.slice(3));
612

13+
// 全局指令
14+
if (!global.MicroAppConfig) {
15+
global.MicroAppConfig = {};
16+
}
17+
const MicroAppConfig = global.MicroAppConfig;
18+
MicroAppConfig.OPEN_SOFT_LINK = argv.openSoftLink || false; // 开启软链接
19+
MicroAppConfig.OPEN_DISABLED_ENTRY = argv.openDisabledEntry || false; // 开启禁用指定模块入口, 优化开发速度
20+
721
const microApp = require('@micro-app/core');
822
const Service = microApp.Service;
923

bin/micro-app-dev.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ process.env.NODE_ENV = process.env.NODE_ENV || 'development';
55

66
const yParser = require('yargs-parser');
77
const argv = yParser(process.argv.slice(2));
8+
89
const { service } = require('./base');
910

1011
service.run('serve', argv);

0 commit comments

Comments
 (0)