Execute CLI command on sub process.
npm install execcli --save
#!/usr/bin/env node
/**
* This is an example to use execcli.
*/
'use strict'
const execcli = require('execcli')
// Equivalent to execute `ls -l .` from command line.
execcli('ls', [ '.', { 'l': true } ]).then(() => {
/* ... */
})
Key | Description | Default |
---|---|---|
notfound | Instruction text when bin not found. | '' |
cwd | Working directory path | process.cwd() |
This software is released under the MIT License.