-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdevelop.js
More file actions
37 lines (35 loc) · 884 Bytes
/
develop.js
File metadata and controls
37 lines (35 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
'use strict';
var spawn = require('child_process').spawn;
var processes = [
{
command: 'npm',
args: ['run', 'serve-app']
},
{
command: 'npm',
args: ['run', 'serve-starter']
},
{
command: 'npm',
args: ['run', 'serve-wallet']
},
{
command: 'npm',
args: ['run', 'serve-simserver']
}
];
processes.forEach(function(proc){
if(process.platform === 'win32') {
proc.command += '.cmd';
}
var single = spawn(proc.command, proc.args, {cwd: proc.cwd});
single.stdout.on('data', function(data){
process.stdout.write('[' + proc.args[1] + ']: ' + data.toString('utf8'));
});
single.stderr.on('data', function(data){
process.stdout.write('[' + proc.args[1] + ']: ' +data.toString('utf8'));
});
single.stderr.on('close', function(code){
console.log('Process "' + proc.command + '" exited with code: ' + code);
});
});