JSPM

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

Exports child_process.spawnSync

Package Exports

  • spawn-sync

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 (spawn-sync) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

spawn-sync

This used to be a polyfill for require('child_process').spawnSync but now all actively maintained node versions already support spawnSync, so this is just a stub that re-exports spawnSync.

Usage

You should remove this library from your dependencies and just do:

var spawnSync = require('child_process').spawnSync;

var result = spawnSync('node',
                       ['filename.js'],
                       {input: 'write this to stdin'});

if (result.status !== 0) {
  process.stderr.write(result.stderr);
  process.exit(result.status);
} else {
  process.stdout.write(result.stdout);
  process.stderr.write(result.stderr);
}

License

MIT