Run a child process within an Atom plugin. Returns a promise with the output.
> npm install atom-plugin-command-line
import commandLine from 'atom-plugin-command-line';
function getNodeVersion() {
return commandLine('node', '-v').then((res) => {
if (!res) {
console.log('Node not installed');
return false;
} else {
return res.match(/([0-9]+)\.([0-9]+)/);
}
});
}