如题,我们需要使用CMD命令去处理一些文件处理工作。请问能否获取处理的进度,我们希望可以展示给用户看。
目前我们只能获取“成功”“失败”。多谢。
走同样的路,发现不同的人生
process.stdout will print out the output of directly executing the CMD command.
soonfy
const exec = require('child_process').exec const build = exec('npm run build') build.stdout.on('data', data => console.log('stdout: ', data))
process.stdout will print out the output of directly executing the CMD command.
soonfy