Need private packages and team management tools?Check out npm Teams »

This package has been deprecated

Author message:

Outdated. Please look for newer implementations

interactive-command

1.0.0 • Public • Published

interactive-command

Latest Version Downloads per Month License

Run a command interactively on all operating systems, including Windows. It uses the child_process.spawn and child_process.spawnSync functions to read the input and the output.

Install

$ npm install --save interactive-command

Usage

var system = require('interactive-command.');
system(cmd, [args, opts, callback])

Where:

  • cmd is the command;
  • args is an array of arguments for the command;
  • opts is an object which can hold:
    • cwd is the working directory where you want the execute the command;
    • sync set true if you want it to run synchronously (default is false);
    • suppressblank set false if you don't want to use the /s flag (only for Windows, default is true).
  • callback is the... callback.

Example:

var system = require('interactive-command.');
system('bower', 'init');

It will run bower init as it runs directly from the console.

License

MIT © Henrique Dias

Install

npm i interactive-command

DownloadsWeekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • avatar