appcd-subprocess

Library for spawning and finding subprocesses.

Usage no npm install needed!

<script type="module">
  import appcdSubprocess from 'https://cdn.skypack.dev/appcd-subprocess';
</script>

README

appcd-subprocess

Library for spawning subprocesses.

Visit https://github.com/appcelerator/appc-daemon for more information.

Report issues to GitHub issues. Official issue tracker in JIRA.

Installation

npm i appcd-subprocess

Usage

import { run } from 'appcd-subprocess';

const { stdout, stderr } = await run('ls', ['-la'], { cwd: '/' });

console.log(stdout);
console.log(stderr);
import { spawn } from 'appcd-subprocess';

const child = spawn({
    command: process.execPath,
    args: [ '--version' ],
    options: { cwd: '/' }
});

child.on('close', code => {
    console.log(`Process exited: ${code}`);
});
import { which } from 'appcd-subprocess';

const executable = await which('ls');
console.log(`Found it: ${executable}`);

Legal

This project is open source under the Apache Public License v2 and is developed by Axway, Inc and the community. Please read the LICENSE file included in this distribution for more information.