Reputation: 14462
I want to write the package, that have to run a program inside - with arguments. It's better to be cross-platform, but the Linux-only solution is good enough.
How to do that in Atom Editor?
Upvotes: 0
Views: 125
Reputation: 6201
Use BufferedProcess to spawn any binary you want.
{BufferedProcess} = require 'atom'
command = 'ps'
args = ['-ef']
stdout = (output) -> console.log(output)
exit = (code) -> console.log("ps -ef exited with #{code}")
process = new BufferedProcess({command, args, stdout, exit})
Upvotes: 1