我创建了默认的AngularCLI项目。 Package.json具有以下脚本。
"scripts": {
"ng": "ng",
"start": "webpack-dev-server --port=4200",
"build": "webpack",
"test": "karma start ./karma.conf.js",
"lint": "ng lint",
"e2e": "protractor ./protractor.conf.js",
"pree2e": "webdriver-manager update --standalone false --gecko false --quiet"
如何运行pree2e脚本。我尝试了npm pree2e
和ng pree2e
但他们都没有工作。量角器使用webdriver-manager
,它安装在C:\...\dw-ng2-app>.\node_modules\protractor\bin\webdriver-manager
答案 0 :(得分:2)
npm运行'scriptname'。所以在我的案例中npm run pree2e