1.0.2 • Published 8 years ago

atom-plugin-command-line v1.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

Atom Plugin Command Line

Run a child process within an Atom plugin. Returns a promise with the output.

Setup

> npm install atom-plugin-command-line

Example

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]+)/);
    }
  });
}