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

package-analyser

v1.1.3

Published

package-analyser 是一个简单易用的分析依赖以及依赖体积的 NodeJS 命令行工具。

Downloads

10

Readme

Static Badge Static Badge NPM version

Static Badge

介绍

package-analyser 是一个简单易用的分析依赖以及依赖体积的 NodeJS 命令行工具。

它实现了:

  1. 分析生产、开发环境下的依赖关系
  2. 分析生产环境下的依赖体积
  3. 判断当前项目是否存在循环依赖(当存在循环依赖时可以展示循环依赖)
  4. 通过2D、3D的形式展示依赖关系
    • 支持搜索某个依赖并进行定位
    • 支持折线、曲线两种方式进行展示
  5. 通过可视化图表的形式展示依赖体积
  6. 支持日间、夜间两种模式
  7. 支持页面展示以及输出为 JSON 文件两种方式

README.md

安装

npm i package-analyser -g

注意:

由于 package-analyser 是一个命令行工具,所以一定要全局安装。

使用

后台使用

/**
 * @param { number } depth:依赖的深度(限制为 整数 以及 Infinity)
 * @param { string } jsonFile:要输出的JSON文件的路径(相对于命令行执行的路径)
 */
analyze-cli analyze [depth] [jsonFile]

依赖图使用

2D

| 操作 | 效果 | | :----: | :----: | | 左键节点 | 拖动节点 | | 左键画布 | 平移视角 | | 左键双击画布 | 放大视角 | | 侧边栏双击节点 | 跳转到节点 | | 滑动滚轮 | 放大缩小视角 |

3D

| 操作 | 效果 | | :----: | :----: | | 左键画布 | 旋转视角 | | 左键/右键节点 | 拖动节点 | | 右键画布 | 平移视角 | | 滑动滚轮 | 缩放视角 |

注意

如果你手动将 localStorage 中的数据删除后不能正常展示,请删除项目根目录下的 time.txt 文件后,重新运行命令行。