build-package.js 536 B

123456789101112131415
  1. var spawn = require('child_process').spawn;
  2. var os = require('os');
  3. var process = require('process');
  4. var args = process.argv.slice(2);
  5. if (os.type() === 'Linux') {
  6. spawn('bash', ['dist/package.sh'].concat(args), {stdio: 'inherit'});
  7. } else if (os.type() === 'Darwin') {
  8. spawn('bash', ['dist/package.sh'].concat(args), {stdio: 'inherit'});
  9. } else if (os.type() === 'Windows_NT') {
  10. spawn('powershell', ['dist/package.sh'].concat(args), {stdio: 'inherit'});
  11. } else {
  12. throw new Error("Unsupported OS found: " + os.type());
  13. }