appcd-subprocess

5.0.6 • Public • Published

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.

/appcd-subprocess/

    Package Sidebar

    Install

    npm i appcd-subprocess

    Weekly Downloads

    229

    Version

    5.0.6

    License

    Apache-2.0

    Unpacked Size

    29.2 kB

    Total Files

    6

    Last publish

    Collaborators

    • cb1kenobi
    • awam
    • tisdk