Simple wrapper to use wp-cli with promises
npm install wpcli




Wrapper to use wp-cli with promises.
``shell`
npm install wpcli --save-dev
`js
const wpCli = require('wpcli').default;
wpCli('./wp-cli.phar', ['--version'], {
cwd: 'vendor/bin'
})
.then((result) => {
console.log(result);
});
`
Same options as child_process.execFile.
Think of this as a mix of child_process.execFile and child_process.spawn.
Returns a child_process instance,
which is enhanced to also be a Promise for a result Object with stdout and stderr` properties.
- wp-cli - Main package.
Feel free to push your code if you agree with publishing under the MIT license.