neon 0.4.0

A safe abstraction layer for Node.js.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
import { promisify } from 'util';
import * as child from 'child_process';

export function spawn(command: string, args?: string[], options?: child.SpawnOptions): Promise<number> {
  return new Promise((resolve, reject) => {
      let ps = child.spawn(command, args || [], options);
      ps.on('error', reject);
      ps.on('close', resolve);
  });
}

export const execFile = promisify(child.execFile);