exec-promise:在幕后使用 child_process.exec 执行命令行字符串,为方便起见,包裹在 bluebird 承诺中

时间:2024-06-30 06:56:25
【文件属性】:

文件名称:exec-promise:在幕后使用 child_process.exec 执行命令行字符串,为方便起见,包裹在 bluebird 承诺中

文件大小:4KB

文件格式:ZIP

更新时间:2024-06-30 06:56:25

JavaScript

执行承诺 在幕后使用 child_process.exec 执行命令行字符串,为方便起见,该字符串包含在中。 安装 $ npm install --save @chmontgomery/exec-promise 用法 var execPromise = require ( '@chmontgomery/exec-promise' ) ; execPromise ( 'ls -l' ) . then ( function ( stdout , stderr ) { // can inspect output if desired console . log ( 'done!' ) ; } ) . catch ( function ( err ) { throw err ; } ) ; /* total 16 -rw-r--r-- 1 montgomer


【文件预览】:
exec-promise-master
----.jshintrc(180B)
----.gitattributes(12B)
----test.js(508B)
----license(1KB)
----.travis.yml(72B)
----.editorconfig(233B)
----.gitignore(13B)
----index.js(532B)
----readme.md(1KB)
----package.json(756B)

网友评论