1

I'm looking for an npm module for wrapping shell commands in modern application style api's.

I came across this module -- https://github.com/mattijs/node-rsync -- which provides a nice fluent-style api around the rsync command. Peaking at the implementation, it looks very much like this pattern could be easily re-used for wrapping other shell commands. It occurs to me this must be a common need -- before I code, I thought I'd search ... Does anyone know of an npm module that implements a general pattern for wrapping specific shell commands in a nice fluent api?

4

1 回答 1

0

有谁知道一个 npm 模块,它实现了一个通用模式,将特定的 shell 命令包装在一个漂亮的流利的 api 中?

child_process 内置模块

显然,不同的命令使用不同的参数语法,所以你不能做得比这更好。

于 2013-09-27T07:17:59.370 回答