ezspawn:轻松产生子进程

时间:2021-05-08 09:25:49
【文件属性】:
文件名称:ezspawn:轻松产生子进程
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-08 09:25:49
JavaScript ezspawn 轻松生成一个过程。 安装 npm install --save ezspawn 用法 var ezspawn = require ( 'ezspawn' ) ; ezspawn ( 'ls -lh' ) . then ( function ( output ) { console . log ( output ) ; } ) ; 原料药 ezspawn.spawn(cmd) 生成一个进程并返回child_process对象。 ezspawn(cmd, timeout=60000) 运行cmd ,并返回带有结果的promise。 cmd 您希望执行的命令。 它使用将字符串解析为适合child_process#spawn格式。 waitForProcess 如果为true,则ezspawn将捕获stdout,stderr并等待进程终止。 返回的promise将解
【文件预览】:
ezspawn-master
----.gitignore(14B)
----package.json(737B)
----.travis.yml(82B)
----index.js(2KB)
----spec()
--------support()
--------ezspawn-spec.js(2KB)
----README.md(1KB)

网友评论