atomiceditor.js 444 B

1234567891011121314151617181920212223
  1. var spawn = require("child_process").spawn;
  2. try {
  3. var platform_cli = require('atomic-cli-mac');
  4. }
  5. catch (e) {
  6. }
  7. try {
  8. var platform_cli = require('atomic-cli-windows');
  9. }
  10. catch (e) {
  11. }
  12. var atomiceditor = function (flags, opts) {
  13. opts = opts || {};
  14. opts.detached = true;
  15. opts.stdio = ["ignore", "ignore", "ignore"];
  16. var child = spawn(platform_cli.ATOMICEDITOR_APP, flags, opts);
  17. child.unref();
  18. };
  19. module.exports = atomiceditor;