npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

cross-exec-file

2.0.0

@kevva

npmHomeRepoSnykSocket
Downloads:53
$ npm install cross-exec-file
DailyWeeklyMonthlyYearly

cross-exec-file Build Status

Cross platform execFile

Install

$ npm install cross-exec-file

Usage

const crossExecFile = require('cross-exec-file');

crossExecFile('cli.js', ['unicorn']).then(res) => {
	console.log(res.stdout);
	//=> 'unicorns & rainbows'
});

API

crossExecFile(bin, [args], [options])

Returns a Promise for a result Object with stdout and stderr properties.

bin

Type: string

Path to your binary to be ran.

args

Type: Array

Arguments to run your binary with.

options

Type: Object

Provide options to be used with execFile

Related

  • execa - A better child_process
  • cross-spawn - A cross platform solution to node's spawn and spawnSync

License

MIT © Kevin Martensson