Skip to content

Commit 64154fe

Browse files
authored
docs: add comparison section (#31)
1 parent 66fd9f7 commit 64154fe

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,26 @@ const proc = x('ls');
212212

213213
proc.exitCode; // number (e.g. 1)
214214
```
215+
216+
## Comparison with other libraries
217+
218+
`tinyexec` aims to provide a lightweight layer on top of Node's own
219+
`child_process` API.
220+
221+
Some clear benefits compared to other libraries are that `tinyexec` will be much lighter, have a much
222+
smaller footprint and will have a less abstract interface (less "magic"). It
223+
will also have equal security and cross-platform support to popular
224+
alternatives.
225+
226+
There are various features other libraries include which we are unlikely
227+
to ever implement, as they would prevent us from providing a lightweight layer.
228+
229+
For example, if you'd like write scripts rather than individual commands, and
230+
prefer to use templating, we'd definitely recommend
231+
[zx](https://github.com/google/zx). zx is a much higher level library which
232+
does some of the same work `tinyexec` does but behind a template string
233+
interface.
234+
235+
Similarly, libraries like `execa` will provide helpers for various things
236+
like passing files as input to processes. We opt not to support features like
237+
this since many of them are easy to do yourself (using Node's own APIs).

0 commit comments

Comments
 (0)