Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

npm-execspawn

1.3.0 • Public • Published

npm-execspawn

Spawn locally installed npm dependencies with cross platform env and argument parsing support.

npm install npm-execspawn

build status

Usage

First do

npm install browserify

Then

var execspawn = require('npm-execspawn')
 
var child = execspawn('browserify $FILENAME', {env:{FILENAME:'test.js'}})
child.stderr.pipe(process.stderr)
child.stdout.pipe(process.stdout)

The above should browserify test.js and both windows and unix. The options is passed directly to child_process.spawn.

You can also pass in a arguments array

execspawn('echo $0 $1 and $2', ['a', 'b', 'c']).stdout.pipe(process.stdout)

The above will print echo a b and c on all platforms.

License

MIT

install

npm i npm-execspawn

Downloadsweekly downloads

928

version

1.3.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar