import * as child from 'child_process' ; export function spawn ( command , args ? , options ? ) { return new Promise ( ( resolve , reject ) => { let ps = child . spawn ( command , args || [ ] , options ) ; ps . on ( 'error' , reject ) ; ps . on ( 'close' , resolve ) ; } ) ; }