Skip to content

Commit

Permalink
Add a dependency on Typedoc (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 authored Nov 4, 2024
1 parent f8d7ee0 commit df51425
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ dist
node_modules
npm-debug.log*
package-lock.json
/docs
/spec

# Editors
.idea
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## 1.0.1

* No user-visible changes

## 1.0.0

* Initial release
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,24 @@
This package exposes a `SyncChildProcess` class that allows Node.js to run a
subprocess synchronously *and* interactively.

[**API Docs**]

[**API Docs**]: https://sass.github.io/sync-child-process/classes/SyncChildProcess.html

## Usage

Use `new SyncChildProcess()` to start running a subprocess. This supports the
Use [`new SyncChildProcess()`] to start running a subprocess. This supports the
same API as [`child_process.spawn()`] other than a few options. You can send
input to the process using `process.stdin`, and receive events from it (stdout,
stderr, or exit) using `process.next()`. This implements [the iterator
protocol], but *not* the iterable protocol because it's intrinsically stateful.
input to the process using [`process.stdin`], and receive events from it
(stdout, stderr, or exit) using [`process.next()`]. This implements [the
iterator protocol], but *not* the iterable protocol because it's intrinsically
stateful.

[the iterator protocol]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterator_protocol
[`new SyncChildProcess()`]: https://sass.github.io/sync-child-process/classes/SyncChildProcess.html#constructor
[`child_process.spawn()`]: https://nodejs.org/api/child_process.html#child_processspawncommand-args-options
[`process.stdin`]: https://sass.github.io/sync-child-process/classes/SyncChildProcess.html#stdin
[`process.next()`]: https://sass.github.io/sync-child-process/classes/SyncChildProcess.html#next
[the iterator protocol]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterator_protocol

```js
import {SyncChildProcess} from 'sync-child-process';
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sync-child-process",
"version": "1.0.0",
"version": "1.0.1",
"description": "Run a subprocess synchronously and interactively in Node.js",
"repository": "sass/sync-child-process",
"author": "Google Inc.",
Expand Down Expand Up @@ -34,6 +34,7 @@
"npm-run-all": "^4.1.5",
"ts-jest": "^29.0.5",
"ts-node": "^10.2.1",
"typedoc": "^0.26.11",
"typescript": "^5.0.2"
},
"dependencies": {
Expand Down

0 comments on commit df51425

Please sign in to comment.