File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 ]
5252 },
5353 "peerDependencies" : {
54- "@micro-app/cli" : " ^0.4.0 "
54+ "@micro-app/cli" : " ^0.4.1 "
5555 },
5656 "devDependencies" : {
57- "@micro-app/cli" : " ^0.4.0 " ,
57+ "@micro-app/cli" : " ^0.4.1 " ,
5858 "@micro-app/plugin-deploy" : " ^0.0.8" ,
5959 "@types/jest" : " ^24.9.1" ,
6060 "eslint-config-2o3t" : " ^2.0.1" ,
Original file line number Diff line number Diff line change @@ -20,9 +20,18 @@ module.exports = async function(api, info = {}) {
2020 // 上下文参数
2121 const apiContext = api . context || { } ;
2222
23- const { index, port, host } = info ;
24- const runApp = require ( index ) ; // app.js
25- await runApp ( app ) ;
23+ const { index, port, host, entries = [ ] } = info ;
24+ if ( entries . length > 0 ) {
25+ await entries . reduce ( ( chain , entry ) => {
26+ const runApp = require ( entry ) ; // app.js
27+ return chain . then ( ( ) => {
28+ return Promise . resolve ( runApp ( app ) ) ;
29+ } ) ;
30+ } , Promise . resolve ( ) ) ;
31+ } else { // 兼容
32+ const runApp = require ( index ) ; // app.js
33+ await runApp ( app ) ;
34+ }
2635
2736 const portfinder = require ( 'portfinder' ) ;
2837
You can’t perform that action at this time.
0 commit comments