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

@jimwong/babel-plugin-istanbul

v4.10.1

Published

基于 [email protected],适用于 babel6,用法基本相同,但有 2 点不同:

Downloads

37

Readme

babel-plugin-istanbul

基于 [email protected],适用于 babel6,用法基本相同,但有 2 点不同:

  1. 增加可选参数 filePathLocationType,默认覆盖率数据的 键名 为相对路径(相对于 cwd 的路径,一般是根目录),使用 prefix 参数还可以在相对路径前增加自定义路径;设置 absolute 是绝对路径(打包机器上文件的绝对路径)
  2. 增加可选参数 relativePathPrefix ,用于在相对路径的前面加上特定的前缀,比如 code/,其中可以选填某些已配置好的 git 相关的参数,比如 store/${project_name}/${branch}/code,参数如下:
    1. ${commit_hash},会替换成 commit 的 hash 值
    2. ${version},会替换成 git 仓库的 version
    3. ${branch},会替换成当前分支名
    4. ${last_commit_datetime},会替换成上次提交的时间
    5. ${remote},会替换成远程仓库的地址
    6. ${project_name},会替换成项目名
  3. 增加可选路径数组参数 needInjectGitInfoJsPathArr,表示对此数组中路径的 js 文件进行注入 git 信息,默认值是 [''](表示所有文件都会注入,不建议这样,会增加项目体积), git 信息数据存放在 window.__git_info__ 上,包含 branchcommitremote 等信息
  4. 增加可选参数 incrementCoverageDir,表示生成增量代码覆盖率时,增量增量代码的生效路径,比如 src,表示只有 src 下的文件变化才会被计算增量覆盖率,如果不设置,则表示所有文件都会被计算增量覆盖率
  5. 增加可选参数 coverageVariable,表示覆盖率数据在全局对象下面的变量名,默认是 __coverage__
  6. 增加可选参数 reportOriginalCoverageFlag,表示是否上报覆盖率源数据,默认是 false
  7. 增加可选参数 reportURL,表示覆盖率源数据上报的 url,如果 reportOriginalCoverageFlagtrue,则此字段必填
  8. 增加可选参数 maxWaitingTimes,表示覆盖率源数据上报超时次数,默认是 6,如果超过这个阈值,则上报逻辑结束