OSDN Git Service

Modified: Upload, Command execution
[eos/zephyr.git] / cli / zephyr-debug
1 #!/usr/bin/env node
2
3 const zephyr = require('commander');
4 const chalk = require('chalk');
5 const cp = require('child_process').spawn;
6 const fs = require('fs');
7
8 zephyr
9 .usage('[action]')
10
11 process.env.NODE_ENV = 'debug';
12 const npm = cp('node', ['--harmony', process.env.ZEPHYR_HOME + '/server/app/']);
13
14 npm.stdout.on('data', function (data) {
15     console.log(data.toString().trim());
16 });
17
18 npm.stderr.on('data', function (data) {
19     console.log(data.toString().trim());
20 });
21
22 zephyr.on('--help', function() {
23     console.log(('  Documentation can be found at ' + chalk.blue('http://www.yasunaga-lab.bio.kyutech.ac.jp/EosJ/index.php/zephyr')));
24     console.log('');
25 });
26
27 zephyr.parse(process.argv);