npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

wpcli

1.0.1 • Public • Published

wpcli

NPM version Travis Build Status dependencies Status devDependencies Status Greenkeeper badge

Wrapper to use wp-cli with promises.

Install

npm install wpcli --save-dev

Usage

const wpCli = require('wpcli').default;
 
wpCli('./wp-cli.phar', ['--version'], {
    cwd: 'vendor/bin'
})
    .then((result) => {
        console.log(result);
    });

API

wpCli(bin, arguments, options)

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.

Related

Contribution

Feel free to push your code if you agree with publishing under the MIT license.

Changelog

License

install

npm i wpcli

Downloadsweekly downloads

7

version

1.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability