0.1.0 • Published 8 years ago

npm-spawn v0.1.0

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

npm-spawn

In Cli

  npm install

In npm-spawn

var npmCmd = require('npm-spawn');
npmCmd(['install'], options)

Examples

npm install => npmCmd(['install'])
npm run build => npmCmd(['run','build])

args

npm install ['install']
npm run build ['run', 'build']

Options

More Options

format like below:

var options = {cwd:'src'};
  • command The command to run
  • args List of string arguments
  • options
  • cwd Current working directory of the child process
  • env Environment key-value pairs
  • stdio | Child's stdio configuration. (See options.stdio)
  • detached Prepare child to run independently of its parent process. Specific behavior depends on the platform, see options.detached)
  • uid Sets the user identity of the process. (See setuid(2).)
  • gid Sets the group identity of the process. (See setgid(2).)
  • shell | If true, runs command inside of a shell. Uses '/bin/sh' on UNIX, and 'cmd.exe' on Windows. A different shell can be specified as a string. The shell should understand the -c switch on UNIX, or /s /c on Windows. Defaults to false (no shell).
0.1.0

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago