npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

istanbul-middleware-ry

v0.0.8

Published

Connect middleware for Istanbul to handle server-side as well as browser coverage use-cases for node apps

Downloads

2

Readme

istanbul-middleware-ry

Istanbul-middleware-ry is modified from istanbul-middleware

istanbul-middleware-ry是由istanbul-middleware修改而来

istanbul-middleware documentation can be found here

http://www.javascriptcn.com/post/50323

istanbul-middleware 文档可参考

https://blog.csdn.net/heromps/article/details/109356164

npm install it:

npm install istanbul-middleware -g

npm安装方法

npm install istanbul-middleware -g
  • npm address:https://www.npmjs.com/package/istanbul-middleware-ry
  • Gitlab address:https://git.minrow.com/ry/istanbul-middleware-ry
  • npm 地址:https://git.minrow.com/ry/istanbul-middleware-ry
  • Gitlab 地址:https://git.minrow.com/ry/babel-plugin-ry-istanbul

Add global command coverage description

| 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 parametersIS_PITCHING_PILE(whether to display the reported data or not) andFRACTION_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 [email protected] -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.
  • Add nyc configuration to package.js:
{
    "script": {
        ......
    },
    "dependencies": {
        ......
    },
    "devDependencies": {
        ......
    },
    "nyc": {
        "include": [
            "html",
            "text-summary"
        ],
        "extension": [
            ".js",
            ".vue",
            ".jsx"
        ]
    }
}

Cut the interface

  • Remove the GET /download interface

使用方法和删减接口说明

新增使用方法

  • 新增全局命令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 [email protected] -g --save-dev
  • 推荐项目中安装nyc用于收集插装文件:npm install nyc --save-dev
  • nyc配置以vue为例,package.json中与scripts平级添加nyc 对象,如下代码所示。
  • Add nyc configuration to package.js:
{
    "script": {
        ......
    },
    "dependencies": {
        ......
    },
    "devDependencies": {
        ......
    },
    "nyc": {
        "include": [
            "html",
            "text-summary"
        ],
        "extension": [
            ".js",
            ".vue",
            ".jsx"
        ]
    }
}

删减接口

  • 删除 GET /download接口

Description of New Features

  • A new global command coverage is added to start or stop the coverage viewing service
  1. Through the (coverage - n | | coverage - nodemon) or (coverage -s || coverage --serve) start the coverage checking service.
  2. Through the coverage - c | | coverage - close close coverage checking service.
  3. Through the coverage - h | | coverage -- help query service coverage

新增功能说明

  • 新增全局命令coverage用于启动或关闭覆盖率查看服务
  1. 通过(coverage -n || coverage --nodemon)或(coverage -s || coverage --serve)启动覆盖率查看服务。
  2. 通过coverage -c || coverage --close关闭覆盖率查看服务。
  3. 通过coverage -h || coverage --help查询覆盖率服务执行命令

ry-istanbul-web

  • NPM address:https://www.npmjs.com/package/ry-istanbul-web

  • GitLab address:https://git.minrow.com/ry/istanbul-web

  • NPM地址:https://www.npmjs.com/package/ry-istanbul-web

  • GitLab地址:https://git.minrow.com/ry/istanbul-web

  • ry-istok-web is modified from istanbul, adding the changeLists array of window.coverage for viewing the incremental code

  • ry-istok-web是由istanbul改装而来,增加window.__coverage__的changeLists数组用于查看增量代码

babel-plugin-istanbul-ry

  • NPM address:https://www.npmjs.com/package/babel-plugin-istanbul-ry

  • GitLab address:https://git.minrow.com/ry/babel-plugin-ry-istanbul

  • NPM地址:https://www.npmjs.com/package/babel-plugin-istanbul-ry

  • GitLab地址:https://git.minrow.com/ry/babel-plugin-ry-istanbul

  • babel-plugin-istanbul-ry bable instrumentation plugin is modified from babel-plugin-istanbul to add incremental code instrumentation methods.

  • babel-plugin-istanbul-ry bable插桩插件由babel-plugin-istanbul改造而来,增加增量代码插桩方法。

0.0.7版本

增加报错兜底及服务

0.0.8版本

更新打包文件