我想生成html格式的代码覆盖率报告。 我已经创建了“ .slather.yml”,并将其添加到用户目录“ / Users / ##### /。slather.yml ”中。
.slather.yml的内容
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"lodash-es": "^4.17.11",
"node-sass": "^4.11.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-redux": "^7.0.2",
"react-scripts": "2.1.8",
"react-spring": "^8.0.19",
"react-swipe-card": "^0.1.4",
"react-with-gesture": "^4.0.8",
"redux": "^4.0.1",
"redux-actions": "^2.6.5",
"redux-saga": "^1.0.2",
"vec-la": "^1.5.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"deploy": "gh-pages -d build"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"devDependencies": {
"gh-pages": "^2.0.1"
}
}
在执行以下命令时出现错误。
xcodeproj: GitRepo/ProjectName/ProjectName.xcodeproj
scheme: SchemeDev
控制台输出:
sudo slather coverage --html
我在Mac上使用“转到文件夹”选项交叉检查了项目路径(/ Users / ##### /GitRepo/ ProjectName),打开了正确的文件夹。