bound-execfile

2.0.0 • Public • Published

bound-execfile

Bind child_process.execFile to a file and configuration.

usage

const node = require(`bound-execfile`)(
  `node`,
  {
    args: {
      prefix: `-`,
      alias: {
        eval: `e`
      }
    }
  }
)
 
node({ eval: `console.log('hello')` }, (error, stdout, stderr) => {
  console.log(stdout.toString())
})

api

boundExecFile(file[, configuration])

  • file - <string> the name or path of the executable file to run
  • configuration - <Object>

Returns a function with the following signature:

fn([options], callback)

Returns <ChildProcess>

.args

The options-to-args module

/bound-execfile/

    Package Sidebar

    Install

    npm i bound-execfile

    Weekly Downloads

    2

    Version

    2.0.0

    License

    MIT

    Last publish

    Collaborators

    • rogerbf