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

visualize-commit

v1.3.0

Published

这是一个统计 git 仓库贡献的工具;主要统计作者所贡献的行数;统计每个文件夹和文件的贡献占比,还有项目中文件类型的占比等。具体如下:

Downloads

45

Readme

介绍

这是一个统计 git 仓库贡献的工具;主要统计作者所贡献的行数;统计每个文件夹和文件的贡献占比,还有项目中文件类型的占比等。具体如下:

  1. 统计每个文件夹下成员的贡献占比
  2. 统计每个文件夹下不同文件的占比
  3. 统计成员commit的数量与每个commit平均更改行数
  4. 统计成员贡献的文件类型占比
  5. 统计成员commit的提交信息词云分析
  6. 统计成员一周每天的commit趋势

使用方法

对本地仓库进行分析

  • 使用 npx 命令生成(推荐)
$ cd git-repository /* 进入需要统计的 git 仓库文件夹 */
$ npx visualize-commit
  • 安装包到对应仓库
$ cd git-repository
$ npm install visualize-commit --save-dev
# or
$ yarn add visualize-commit --dev

package.json加入对应的脚本:

{
  "scripts": {
    "vsz": "vsz-commit"
  }
}

执行命令:

$ npm run vsz
# or
$ yarn add vsz

对远端的仓库进行分析

通过配置 -g 命令,设定需要分析的远端仓库,例如:

$ npx visualize-commit -g [email protected]:jingzhiMo/visualize-commit.git

目前只支持 git 协议的克隆方式,不支持 https 的方式

依赖环境

  • node > 8 (支持 async function) 建议安装最新稳定版 node 版本
  • npx (建议安装,通常 npm 5.2.0 版本之后会自动安装)
  • git

统计截图

下面的统计截图是对create-react-app仓库v3.3.0版本统计的demo

  • 统计每个文件夹下成员的贡献占比

vsz-1.png

  • 统计每个文件夹下不同文件的占比

vsz-2.png

  • 统计成员commit的数量与每个commit平均更改行数

vsz-3.png

  • 统计成员贡献的文件类型占比

vsz-4.png

  • 统计成员commit的提交信息词云分析

vsz-5.png

  • 统计成员一周每天的commit趋势

vsz-6.png