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

babel-plugin-istanbul-ry

v0.0.5

Published

A babel plugin that adds istanbul instrumentation to ES6 code

Downloads

4

Readme

babel-plugin-ry-istanbul-web

Babel-plugin-ry-isture-web is modified by babel-plugin-istanbul

babel-plugin-ry-istanbul-web是通过babel-plugin-istanbul修改而来

babel-plugin-istanbul documentation can be found here

https://www.npmjs.com/package/babel-plugin-istanbul

babel-plugin-istanbul 文档可参考

http://www.npmdoc.org/babel-plugin-istanbulzhongwenwendangbabel-plugin-istanbul-jszhongwenjiaochengjiexi.html

npm install it:

npm install --save-dev babel-plugin-ry-istanbul

npm安装方法

npm install --save-dev babel-plugin-ry-istanbul
  • 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

Increasing the parameter indicates instrmenttation

| parameter | explain | type | An optional value | default | other description | | ------------------- | ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | -------- | ----------------------------------------------| | IS_PITCHING_PILE | Whether in pile | String/Boolean | true (String、Boolean) /false (String、Boolean) | false (Boolean) | false (String, Boolean) true (String) disables instrumentation, true (Boolean) allows it | | INCREMENT | Whether to filter delta files | String/Boolean | true (String、Boolean) /false (String、Boolean) | false (Boolean) | true (String, Boolean) looks at incremental code, false (String) looks at the full code (including incremental code), false (Boolean) looks at the full code, and does not display new or changed statements. | | BRANCH | git diff the branch to compare against | String | The branch name to compare against | origin/master | Don't wear it when the IS PITCHING PILE is false |

增加参数说明instrmenttation

| 参数 | 说明 | 类型 | 可选值 | 默认值 | 其他说明 | | ------------------- | ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | -------- | ---------- | | IS_PITCHING_PILE | 是否插桩 | String/Boolean | true (String、Boolean) /false (String、Boolean) | false(Boolean) | false (String、Boolean) true(String)禁止插桩,true (Boolean)允许插桩 | | INCREMENT | 是否过滤增量文件 | String/Boolean | true (String、Boolean) /false (String、Boolean) | false(Boolean) | true(String、Boolean)看增量代码,false(String)看全量代码(包括增量代码), false(Boolean)看全量代码,不显示“新增或变更语句” | | BRANCH | git diff需要对比的分支 | String | 需要对比的分支名 | origin/master | 当IS_PITCHING_PILE为false的时候可以不穿 |

Increment interpolation

*In the case of vue, This is done via babel.config.js's plugins configuration, as shown in the following code:

plugins: [
 [
      'istanbul-ry',
      {
        extension: ['.js', '.vue'],
        instrmenttation: {
          BRANCH: 'origin/master',
          INCREMENT: 'true',
          IS_PITCHING_PILE: true,
          IS_HTML_CSS: false
        }
      }
    ]
]

It is recommended to comment out the plugins when the code is uploaded or the instrmenttation does not transfer any value

增量插桩

  • vue为例,通过babel.config.js的plugins配置即可完成如下代码所示:
plugins: [
 [
      'istanbul-ry',
      {
        extension: ['.js', '.vue'],
        instrmenttation: {
          BRANCH: 'origin/master',
          INCREMENT: 'true',
          IS_PITCHING_PILE: true,
          IS_HTML_CSS: false
        }
      }
    ]
]

上传代码时需要将plugins注释掉即可,也可不传输instrmenttation参数,推荐注释后上传

Description of New Features

  • Add the instrmenttation parameter
  1. IS_PITCHING_PILE determines if code coverage can be instrumentalized
  2. Use the BRANCH parameter to identify the git branch you want to compare against
  3. Use INCREMENT to determine if you want to see the incremental code
  4. IS HTML CSS to determine if vue should look at html and css structure

新增功能说明

  • 新增instrmenttation参数
  1. 通过IS_PITCHING_PILE判断是否可以插装收集代码覆盖率
  2. 通过BRANCH参数确认需要对比的git分支
  3. 通过INCREMENT判断是否需要查看增量代码
  4. 通过IS_HTML_CSS判断vue下是否要看html及css结构

other description

This plugin needs to be used with ry-istanbul-web and istanbul-middleware-ry

其他说明

本插件需配合ry-istanbul-webistanbul-middleware-ry一起使用

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数组用于查看增量代码

istanbul-middleware-ry

  • NPM address:https://www.npmjs.com/package/istanbul-middleware-ry
  • GitLab address:https://git.minrow.com/ry/istanbul-middleware-ry
  • NPM地址:https://www.npmjs.com/package/istanbul-middleware-ry
  • GitLab地址:https://git.minrow.com/ry/istanbul-middleware-ry
  • The istanbul-middleware-ry istanbul viewing service is transformed from istanbul-middleware, and the start service is added. The istanbul code coverage can be collected and viewed through the global command coverage -n start service.
  • istanbul-middleware-ry istanbul查看服务由istanbul-middleware改造而来,增加启动服务,可通过全局命令coverage -n启动服务收集并查看istanbul代码覆盖率。