0.9.0 • Published 5 months ago

r4y v0.9.0

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
5 months ago

r4y

A typescript library for spawning and executing child processes.

Implementation

A common implementation is the following:

import ray from 'r4y';

const response = await ray.execute('echo $WHATEVER');
console.log(response);

await ray.spawn('find . -type f | wc');

Configuration

import ray from 'r4y';
ray.config.set({
  debug: false,
  spin: false,
  spawn: {
    log: {
      stdout: 'trace',
      stderr: 'error',
    }
  },
});

Configuration parameters

Parameter nameParameter typeParameter description
debugbooleanWheater or not to console log debugging information like child ID
spinbooleanWheater or not to show a spinning console log
spawn.log.stdoutLogMethodHow the child process should log its stdout
spawn.log.stderrLogMethodHow the child process should log its stderr
type LogMethod = 'trace' | 'debug' | 'info' | 'warn' | 'error';

Unix philosophy

This repo try to follow the Unix philosophy.

Name

r4y stands for ray, like in Radioactive ray.

Other related repositories

3xp A typescript library for validating objects.

i0n A typescript library for console logging.

w3i A typescript library for handling configurations.

0.9.0

5 months ago

0.8.0

6 months ago

0.7.0

1 year ago

0.6.0

1 year ago

0.5.2

1 year ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.3

2 years ago

0.5.1

2 years ago

0.4.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago