npm脚本不是串行运行的

时间:2017-07-18 07:45:25

标签: npm

我想将eslint作为预启动脚本运行,因此如果失败则不会运行构建脚本,但即使eslint返回“clean”结果,它仍然会阻止以下脚本运行。 因此,您可以在下面的示例中看到,测试未运行。 我甚至尝试更换订单并首先运行测试,但随后lint脚本无法运行。

有什么想法吗?

"scripts": {
"prestart": "npm run lint:watch && npm run test:watch",
"start": "open:src",
"open:src": "nodemon --watch server --exec babel-node --debug=5858 --inspect server/srcServer.js --delay 2",
"lint": "node_modules/.bin/esw webpack.config.* --cache --max-warnings 0 src server",
"lint:watch": "npm run lint -- --watch",
"test": "mocha --reporter progress server/testSetup.js 'src/**/*.test.js'",
"test:watch": "npm run test -- --watch"
},

1 个答案:

答案 0 :(得分:-1)

现在我知道愚蠢的感觉:) "观看"在测试和皮棉导致它停止,因为它没有退出 非常感谢我解决我的问题。