我的目标是在我的"捆绑"中执行以下步骤。导出电子应用程序的过程:
到目前为止,我有以下
require('shelljs/make');
require('shelljs/global');
var path = require('path');
target.all = function () {
target.bundle();
}
target.bundle = function () {
console.log('Building for architecture: ' + process.platform + platform.arch);
var meteorPath = path.join(__dirname, 'meteor');
cd(meteorPath);
// this runs for a while, make it asyncronous
var meteorCommand = exec('meteor', { async: true });
meteorCommand.stdout.on('data', function (data) {
// ???
});
}
这会产生预期的输出stdout
。
Building for: darwinx64
[[[[[ ~/Code/test/meteor-test ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Babel active on file extensions: es6.js, es6, jsx
I20150728-10:06:05.899(-4)? electrify: installing electrified dependencies
I20150728-10:06:07.005(-4)? electrify: launching electron
=> Started your app.
=> App running at: http://localhost:3000/
但是,我遇到了一个问题...... meteor有一个启动过程,需要先运行才能使用meteor shell
,这是最后一步,它说" App运行于:& #34;
如何在打开流星球之前等待此事件发生?