JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 72
  • Score
    100M100P100Q62663F
  • License

Simple, fast, flexible and cross-platform async executing commands (with child_process spawn)

Package Exports

  • async-exec-cmd

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (async-exec-cmd) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm mit license build status coverage status deps status

Simple, fast, flexible and cross-platform async executing commands (with child_process spawn)

Install

npm install async-exec-cmd
npm test

API

For more use-cases see the tests

.asyncExecCmd

Async execute command via spawn

  • <cmd> {String}
  • <args> {Array|Function}
  • [opts] {Object|Function}
  • [callback] {Function}
  • returns {Stream} spawned child process

Example:

var exec = require('async-exec-cmd');
var cp = exec('echo', [
  'hello world'
], function __cb(err, res) {
  // as usual
  if (err) {
    return console.error(err);
  }
  var stdout = res[1];
  var code = res[0];
  console.log(stdout, code)
  //=> code is process exit/close code
  //=> stdout === 'hello world'
})

Author

Charlike Mike Reagent

License MIT license

Copyright (c) 2015 Charlike Mike Reagent, contributors.
Released under the MIT license.


Powered and automated by kdf, January 22, 2015