https://github.com/media-service-dev/process
Library to easier work with processes in node
https://github.com/media-service-dev/process
library nodejs process typescript
Last synced: 10 months ago
JSON representation
Library to easier work with processes in node
- Host: GitHub
- URL: https://github.com/media-service-dev/process
- Owner: media-service-dev
- License: mit
- Created: 2020-03-19T12:10:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-16T12:10:06.000Z (over 4 years ago)
- Last Synced: 2025-01-13T03:46:27.128Z (over 1 year ago)
- Topics: library, nodejs, process, typescript
- Language: TypeScript
- Homepage: https://media-service.com/
- Size: 476 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @mscs/process
This is a library to handle child processes in typescript for node.
## Installation
```shell script
$ yarn add @mscs/process
```
## Usage
Short example:
```typescript
import { Process } from "@mscs/process";
async function runtime() {
const listDirectoryProcess = new Process(["ls", "-lar"]);
const exitCode = await listDirectoryProcess.run();
if(listDirectoryProcess.isSuccessful()){
const output = listDirectoryProcess.getOutput();
// ...
} else {
const output = listDirectoryProcess.getErrorOutput();
// ...
}
}
runtime().catch(error => {
console.log(error);
process.exit(1);
});
```
# Important note
Since *Symfony* is, for good reason, a registered trademark, please take note that we are in no way associated with [the Symfony brand](https://symfony.com/) or the [SensioLabs](https://sensiolabs.com/) organization.
Therefore, we don't represent or speak for any of them.