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 🙏

© 2025 – Pkg Stats / Ryan Hefner

my-ui-library-bydumi

v0.0.2

Published

A react library developed with dumi

Readme

my

NPM version NPM downloads

A react library developed with dumi

Usage

TODO

Options

TODO

Development

# install dependencies
$ pnpm install

# develop library by docs demo
$ pnpm start

# build library source code
$ pnpm run build

# build library source code in watch mode
$ pnpm run build:watch

# build docs
$ pnpm run docs:build

# Locally preview the production build.
$ pnpm run docs:preview

# check your project for potential problems
$ pnpm run doctor

LICENSE

MIT

要将当前包发布到 npm 上,需要按照以下步骤进行操作:

一、准备工作

  1. 检查包配置

    • 查看 package.json 文件,确保以下字段正确:
      • name :包名,确保在 npm 上唯一(可通过 npm view <包名> 检查是否已存在)
      • version :遵循 Semantic Versioning(语义化版本)规范(如 1.0.0 )
      • main / module / types :确保入口文件路径正确
      • files :指定要发布的文件/目录(当前项目已配置 ["dist"] ,仅发布构建产物)
  2. 配置 .npmignore (可选)

    • 如果没有 .npmignore 文件,npm 会默认忽略 .gitignore 中的文件
    • 确保只发布必要的文件(如 dist 目录、README、LICENSE 等)
  3. 注册 npm 账号

    • 如果没有 npm 账号,先在 npm 官网 注册
    • 或通过命令行注册: npm adduser

二、发布前验证

  1. 运行构建

    npm run build

    确保构建成功,生成 dist 目录

  2. 运行测试和 lint(可选但推荐)

    npm run lint  # 检查代码质量
    # 如果有测试脚本,运行测试
  3. 检查发布内容(可选)

    npm pack  # 生成 .tgz 文件,可查看包含
    的文件

三、发布流程

  1. 登录 npm

    npm login
    • 输入 npm 用户名、密码和邮箱
    • 注意:确保当前 registry 是官方 npm registry( https://registry.npmjs.org/ ),而不是淘宝镜像等
  2. 发布包

    npm publish
    • 如果是第一次发布,会直接发布
    • 如果是更新版本,需要先修改 package.json 中的 version 字段
  3. 验证发布结果

    npm view <包名>  # 查看已发布的包信息

四、注意事项

  1. 版本管理

    • 每次发布前需更新版本号
    • 遵循 Semantic Versioning:
      • 主版本(Major):不兼容的 API 变更
      • 次版本(Minor):向后兼容的新功能
      • 补丁版本(Patch):向后兼容的 bug 修复
  2. 发布权限

    • 如果包名被占用,需要更换包名或联系现有包的所有者
    • 组织包(如 @username/package )需要先创建组织
  3. 后续更新

    • 每次更新代码后,需重新构建并发布
    • 可使用 npm version 命令自动更新版本号:
      npm version patch  # 更新补丁版本
      npm version minor  # 更新次版本
      npm version major  # 更新主版本

五、当前项目的发布建议

当前项目已经配置了:

  • 正确的 files 字段(仅发布 dist 目录)
  • 完整的构建脚本
  • 类型声明文件 发布前需要:
  1. 确认 package.json 中的 name 字段唯一(当前为 ui-library ,可能已被占用,建议修改为更独特的名称,如 my-dumi-ui-library )
  2. 确保 version 字段符合语义化版本规范
  3. 运行 npm run build 确保构建成功
  4. 使用 npm login 登录 npm 账号
  5. 运行 npm publish 发布包

示例发布命令

# 修改包名(可选,避免冲突)
npm pkg set name="my-dumi-ui-library"

# 构建
npm run build

# 登录
npm login

# 发布

修改包名(可选,避免冲突)

npm pkg set name="my-dumi-ui-library"

构建

npm run build

登录

npm login

发布

npm publish