Run a command interactively on all operating systems, including Windows. It uses the
child_process.spawnSync functions to read the input and the output.
$ npm install --save interactive-command
var system = require('interactive-command.'); system(cmd, [args, opts, callback])
cmdis the command;
argsis an array of arguments for the command;
optsis an object which can hold:
cwdis the working directory where you want the execute the command;
syncset true if you want it to run synchronously (default is
suppressblankset false if you don't want to use the
/sflag (only for Windows, default is
callbackis the... callback.
var system = require('interactive-command.'); system('bower', 'init');
It will run
bower init as it runs directly from the console.
MIT © Henrique Dias