2017-07-18 94 views
-1

我想运行eslint作为预启动脚本,所以如果失败它不会运行构建脚本,但即使eslint返回“干净”结果,它仍然停止运行下列脚本。 因此,您可以在下面的示例中看到,测试未运行。 我甚至试图替换顺序并首先运行测试,但是然后lint脚本不运行。npm脚本没有在系列运行

任何想法?

"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

现在我知道那是什么感觉是愚蠢的:)
“监视”中考或线头导致它停止,因为它不会退出。
非常感谢我解决我的问题。