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` 对象,如下代码所示。
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"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