Commit d0c88dca by lxyang

feat:0.0.6版本更新ry-istanbul-web版本

parent af449aa0
......@@ -22,23 +22,33 @@ npm install istanbul-middleware -g
* Gitlab 地址:https://git.minrow.com/ry/babel-plugin-ry-istanbul
## Add global command `coverage` description
| property | explain | Other |
| property | explain | Other (The default wear and) |
| ------------------- | ------------------------------------------------------------ | -------- |
| coverage -n || coverage --nodemon | Start the view service command (nodemon listening service mode) | This command is a local debugging solution |
| coverage -s || coverage --serve | Start the view service command (pm2 listening service mode) | This command is a local debugging solution |
| coverage -c || coverage --close | Close the view service command | Used when a service port fails to close properly |
| coverage -h || coverage --help | See how to use the command | without |
| 属性 | 说明 | 其他 |
## 增加全局方法`coverage`
| 属性 | 说明 | 其他 (默认穿参) |
| ------------------- | ------------------------------------------------------------ | -------- |
| coverage -n || coverage --nodemon | 启动查看服务命令(nodemon监听服务方式) | 此命令为本地调试方案 |
| coverage -s || coverage --serve | 启动查看服务命令(pm2监听服务方式) | 此命令为本地调试方案 |
| coverage -c || coverage --close | 关闭查看服务命令 | 当服务端口未能正常关闭时使用 |
| coverage -h || coverage --help | 查看命令使用方法 | 无 |
## Passable arguments
| property | explain | type | default | other parameters |
| ------------------- | ------------------------------------------------------------ | -------- | ------ | ------ |
| IS_PITCHING_PILE | Whether or not to collect reported data for display. false does not collect data | string | true | true/false |
| FRACTION_OF_COVERAGE_PORT | Port number to start the service | string | 10000 | without |
## 可传入参数
| 属性 | 说明 | 类型 | 默认值 | 其他参数 |
| ------------------- | ------------------------------------------------------------ | -------- | ------ | ------ |
| IS_PITCHING_PILE | 是否收集上报数据进行展示,false则不收集数据 | string | true | true/false |
| FRACTION_OF_COVERAGE_PORT | 启动服务时的端口号 | string | 10000 | 无 |
## Use method and delete interface description
### New usage methods
* New global order 'coverage - n' startup code coverage check service, provide code coverage check services, access: 'http://localhost:10000/coverage/client' can view, related command to view above.
* New global parameters`IS_PITCHING_PILE`(whether to display the reported data or not) and`FRACTION_OF_COVERAGE_PORT`(port number to start the service) are added. `coverage -n IS_PITCHING_PILE=true FRACTION_OF_COVERAGE_PORT=10001`
* To use the command, install pm2: `npm install pm2@5.2.0 -g --save-dev`
* It is recommended that `nyc` be installed in the project to collect instrumentation files:`npm install nyc --save-dev`
* `nyc` Configuration Using `vue` as an example, add an `nyc` object to `package.json` at the same level as `scripts`, as shown in the following code.
......@@ -72,6 +82,7 @@ npm install istanbul-middleware -g
## 使用方法和删减接口说明
### 新增使用方法
* 新增全局命令`coverage -n`启动代码覆盖率查看服务,提供代码覆盖率查看服务,访问:'http://localhost:10000/coverage/client’ 即可查看,相关命令可查看上方命令说明。
* 新增全局穿参`IS_PITCHING_PILE`(是否对上报数据进行展示)、`FRACTION_OF_COVERAGE_PORT`(启动服务的端口号),使用方法:`coverage -n IS_PITCHING_PILE=true FRACTION_OF_COVERAGE_PORT=10001`
* 使用命令前需在项目代码中安装pm2: `npm install pm2@5.2.0 -g --save-dev`
* 推荐项目中安装`nyc`用于收集插装文件:`npm install nyc --save-dev`
* `nyc`配置以`vue`为例,`package.json`中与`scripts`平级添加`nyc` 对象,如下代码所示。
......
{
"name": "istanbul-middleware-ry",
"version": "0.0.4",
"version": "0.0.6",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "istanbul-middleware-ry",
"version": "0.0.4",
"version": "0.0.6",
"license": "BSD",
"dependencies": {
"@babel/helper-plugin-utils": "^7.0.0",
......@@ -51,7 +51,6 @@
"mkdirp": "*",
"pm2": "^5.2.0",
"rimraf": "*",
"ry-istanbul-web": "^0.0.3",
"yui-lint": "*"
},
"engines": {
......@@ -7777,135 +7776,6 @@
"tslib": "^2.1.0"
}
},
"node_modules/ry-istanbul-web": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/ry-istanbul-web/-/ry-istanbul-web-0.0.3.tgz",
"integrity": "sha512-cxIZ4bPJC4b2fLcbBpQYVpY2r7n+U7Lq5xMprNkYw2HAxmGoY+9LW68h00Y45QezPTWqxhg+tcysDflJGcXJXA==",
"dev": true,
"dependencies": {
"abbrev": "1.0.x",
"async": "1.x",
"escodegen": "1.8.x",
"esprima": "2.7.x",
"glob": "^5.0.15",
"handlebars": "^4.0.1",
"js-yaml": "3.x",
"mkdirp": "0.5.x",
"nopt": "3.x",
"once": "1.x",
"resolve": "1.1.x",
"supports-color": "^3.1.0",
"which": "^1.1.1",
"wordwrap": "^1.0.0"
},
"bin": {
"istanbul": "lib/cli.js"
}
},
"node_modules/ry-istanbul-web/node_modules/abbrev": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz",
"integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==",
"dev": true
},
"node_modules/ry-istanbul-web/node_modules/async": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
"integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==",
"dev": true
},
"node_modules/ry-istanbul-web/node_modules/esprima": {
"version": "2.7.3",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
"integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==",
"dev": true,
"bin": {
"esparse": "bin/esparse.js",
"esvalidate": "bin/esvalidate.js"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/ry-istanbul-web/node_modules/glob": {
"version": "5.0.15",
"resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
"integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==",
"dev": true,
"dependencies": {
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "2 || 3",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"engines": {
"node": "*"
}
},
"node_modules/ry-istanbul-web/node_modules/has-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
"integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/ry-istanbul-web/node_modules/mkdirp": {
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
"integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
"dev": true,
"dependencies": {
"minimist": "^1.2.6"
},
"bin": {
"mkdirp": "bin/cmd.js"
}
},
"node_modules/ry-istanbul-web/node_modules/nopt": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
"integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==",
"dev": true,
"dependencies": {
"abbrev": "1"
},
"bin": {
"nopt": "bin/nopt.js"
}
},
"node_modules/ry-istanbul-web/node_modules/resolve": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
"integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==",
"dev": true
},
"node_modules/ry-istanbul-web/node_modules/supports-color": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
"integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==",
"dev": true,
"dependencies": {
"has-flag": "^1.0.0"
},
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/ry-istanbul-web/node_modules/which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"dev": true,
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"which": "bin/which"
}
},
"node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
......@@ -15262,109 +15132,6 @@
"tslib": "^2.1.0"
}
},
"ry-istanbul-web": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/ry-istanbul-web/-/ry-istanbul-web-0.0.3.tgz",
"integrity": "sha512-cxIZ4bPJC4b2fLcbBpQYVpY2r7n+U7Lq5xMprNkYw2HAxmGoY+9LW68h00Y45QezPTWqxhg+tcysDflJGcXJXA==",
"dev": true,
"requires": {
"abbrev": "1.0.x",
"async": "1.x",
"escodegen": "1.8.x",
"esprima": "2.7.x",
"glob": "^5.0.15",
"handlebars": "^4.0.1",
"js-yaml": "3.x",
"mkdirp": "0.5.x",
"nopt": "3.x",
"once": "1.x",
"resolve": "1.1.x",
"supports-color": "^3.1.0",
"which": "^1.1.1",
"wordwrap": "^1.0.0"
},
"dependencies": {
"abbrev": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz",
"integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==",
"dev": true
},
"async": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
"integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==",
"dev": true
},
"esprima": {
"version": "2.7.3",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
"integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==",
"dev": true
},
"glob": {
"version": "5.0.15",
"resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
"integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==",
"dev": true,
"requires": {
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "2 || 3",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"has-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
"integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==",
"dev": true
},
"mkdirp": {
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
"integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
"dev": true,
"requires": {
"minimist": "^1.2.6"
}
},
"nopt": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
"integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==",
"dev": true,
"requires": {
"abbrev": "1"
}
},
"resolve": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
"integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==",
"dev": true
},
"supports-color": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
"integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==",
"dev": true,
"requires": {
"has-flag": "^1.0.0"
}
},
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"dev": true,
"requires": {
"isexe": "^2.0.0"
}
}
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
......
{
"name": "istanbul-middleware-ry",
"description": "Connect middleware for Istanbul to handle server-side as well as browser coverage use-cases for node apps",
"version": "0.0.5",
"version": "0.0.6",
"main": "lib/index.js",
"files": [
"lib"
......@@ -71,7 +71,7 @@
"mkdirp": "*",
"pm2": "^5.2.0",
"rimraf": "*",
"ry-istanbul-web": "^0.0.5",
"ry-istanbul-web": "^0.0.6",
"yui-lint": "*"
},
"engines": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment