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

npm-cli-bytetech-ys

v2.2.7

Published

> 上传NPM包的时候,可以直接上传 dist/* 以及 packages/npm-packages-ui/dist/* 即可 #### 1. 需求 - 需要封装为 node 命令行工具; - 支持 xx-cli analyze 命令,用于分析从当前目录 package.json 开始递归查找到的全量依赖关系(包名 & 版本号),分析完成后自动打开网页,并渲染依赖关系图; - 注意处理好循环依赖问题,避免陷入死循环; - 支持 --depth=n 参数,限制向下递归分析的层次深度;

Downloads

32

Readme

字节第六期青训营项目一 - 包的分析工具

上传NPM包的时候,可以直接上传 dist/* 以及 packages/npm-packages-ui/dist/* 即可

1. 需求

  • 需要封装为 node 命令行工具;
  • 支持 xx-cli analyze 命令,用于分析从当前目录 package.json 开始递归查找到的全量依赖关系(包名 & 版本号),分析完成后自动打开网页,并渲染依赖关系图;
    • 注意处理好循环依赖问题,避免陷入死循环;
    • 支持 --depth=n 参数,限制向下递归分析的层次深度;
    • 支持 --json=[file-path] 参数,传入后不再打开网页,只是将依赖关系以 JSON 形式存储到用户指定的文件;
  • 在打开页面中,除了渲染依赖关系图外,期望对依赖关系做出初步分析,例如:
    • 是否包含循环依赖;
    • 同一个 package 是否包含多个版本实例; 分析页面的具体样式,由各组自行决定;的

2. 技术栈

  • 功能开发:
    • 依赖关系图:antv/x6、echarts、D3 等均可;
  • 工程化:
    • 使用 TypeScript 开发;
    • 使用 vitest/jest 实现单元测试;
    • 接入 eslint、lint-staged 工具;

3. 产出

  • 源码,期望提交到 github;
  • 发布到 npm 的 CLI 工具包;
  • 项目说明文档
  • 最迟2023-08-30结束

步骤

  - 前提,记得获取前端的依赖以及项目的依赖,应该是分开处理的。
  1. 先把packages中的vue项目打包,每次调整都要重新打包,主要使用dist中的文件 
  2. 使用build命令进行打包
  2. 使用link命令将一个本地的 npm 包链接到全局环境
  3. 即可测试命令

注意

- package.json 中的name,要与bin中的key一致方可使用
- package.json 中设置type: module,会导致打包后的commander在运行时候异常