Nighttime Peanut Migrations

    promise-child

    1.0.1 • Public • Published

    Build Status npm version

    promise-child

    Create a promise from a ChildProcess.

    Install

    npm install promise-child --save

    Use

    var promisify = require("promise-child");
    var spawn = require("child_process").spawn;
     
    var child = spawn("echo", ["hello"]);
     
    promisify(child).then(function(code){
     // code === 0
    });
     
    promisify(child, {
      stdout: true
    }).then(function(result){
      // result.code === 0
      // result.stdout -> Whatever stdout spit out.
    });

    License

    BSD 2 Clause

    Install

    npm i promise-child

    DownloadsWeekly Downloads

    22

    Version

    1.0.1

    License

    BSD-2-Clause

    Last publish

    Collaborators

    • matthewp