You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

elxr 991B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/env node
  2. var ENV = Object.assign({}, process.env); // Shallow clone it.
  3. const spawn = require('child_process').spawn;
  4. const child = spawn(
  5. (process.platform === 'win32' ? 'npm.cmd' : 'npm')
  6. , ['run', 'index'].concat(process.argv.slice(2)), { cwd: __dirname });
  7. // const child = spawn(
  8. // 'C:\\Program Files\\Git\\bin\\sh.exe'
  9. // , ['notepad', 'index'], { cwd: __dirname });
  10. // ENV.FORCE_COLOR = true;
  11. // const child = spawn(
  12. // 'node'
  13. // , ['../index.js', 'pull'], { env : ENV, cwd: __dirname });
  14. process.stdin.pipe(child.stdin)
  15. child.stdout.pipe(process.stdout)
  16. child.stderr.pipe(process.stderr)
  17. // started.stdout.on('data', function (data) {
  18. // console.log('stdout:', data.toString());
  19. // });
  20. // started.stderr.on('data', function (data) {
  21. // console.log('stderr:', data.toString());
  22. // });
  23. // started.on('exit', function (code) {
  24. // console.log('child process exited with code:', code.toString());
  25. // });