npm-bin
v0.1.0
Published
Easily call local NPM binaries
Downloads
44
Readme
npmBin
Easily call local NPM binaries
When using [ShellJS], you can write:
var config = 'karma.conf.js';
npmBin('karma', [config, 'start']);
instead of:
var config = 'karma.conf.js';
exec('node_modules/.bin/karma ' + config + ' start');
You can also pass in environment variables:
var config = 'karma.conf.js';
var envs = {
'PHANTOMJS_BIN': '/opt/phantomjs/bin/phantomjs'
}
npmBin('karma', [config, 'start'], { envs: envs });