获取并发脚本以完成

Getting concurrently scripts to complete

我正在尝试为 运行 创建端到端测试套件的脚本。我目前正在同时使用 angular cli,如下所示:

"e2e": "concurrently \"ng e2e --proxy-config proxy.conf.json\" \"cross-env NODE_ENV=development node server\"",

它 运行 没问题,但我的问题是显然 ng e2e 命令完成时,我的后端服务器没有。有什么方法可以让整个命令在测试完成后完成吗?

找到了! Concurrently 已经想到了这一点并帮助实现了以下开关 --kill-others --success first.

--kill-others 表示 "if one command completes, kill the other and --success first means " 如果第一个命令成功 return 整个并发命令的成功代码。