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 🙏

© 2026 – Pkg Stats / Ryan Hefner

npm-text-qdh

v2.1.1

Published

1. git 创建仓库,用于代码存储。目前使用gitte做仓库处理,[地址](https://gitee.com/),支持国产。 2. 注册npm账号,[npm地址](https://www.npmjs.com/),按照官网进行账号注册,此处无需多言。 3. npm及git安装,安装node.js和git,并进行配置,建议使用nvm做node版本管理,,可随意切换npm版本。 4. 安装nrm做映射源管理,npm发布包需要修改映射源为npm源。 > npm ---------- https://r

Readme

npm 包发布

项目启动准备

  1. git 创建仓库,用于代码存储。目前使用gitte做仓库处理,地址,支持国产。
  2. 注册npm账号,npm地址,按照官网进行账号注册,此处无需多言。
  3. npm及git安装,安装node.js和git,并进行配置,建议使用nvm做node版本管理,,可随意切换npm版本。
  4. 安装nrm做映射源管理,npm发布包需要修改映射源为npm源。

npm ---------- https://registry.npmjs.org/ yarn --------- https://registry.yarnpkg.com/ tencent ------ https://mirrors.cloud.tencent.com/npm/ cnpm --------- https://r.cnpmjs.org/ taobao ------- https://registry.npmmirror.com/ npmMirror ---- https://skimdb.npmjs.com/registry/

项目新建

  1. 创建项目文件夹, mkdir npmText
  2. 进入项目管理文件夹,此处以npmText例子, cd npmTest
  3. 执行npm init -y或者npm init --yes,进行npm初始化。此时会生成package.json以及package.lock.json文件夹。package.json文件内容如下:

    { "name": "xiao-npm-test001", "version": "1.0.0", "description": "my first npm", "main": "index.js", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "author": "xiaojt", "license": "ISC", "dependencies": { "xiao-npm-test001": "^1.0.0" } }

发布前准备

  • 新建index.js,并编写自己要发布的内容,此处使用nodejs规范 commonJs导出。

function npmDemo(argument) { var name = 'xiao '; var f1 =function f(arg){console.log(arg)} return { name:name, f1:f1 } } module.exports=npmDemo();

  • 修改package.json文件内容
    1. name: 修改为自己发布包的名称,尽量不与线上包名称相近或重复
    2. 修改main: 此时需要修改为自己包的入口文件,例 ./index.js
    3. 修改version, 遵循x.y.z做版本处理,第一次默认为1.0.0。
  • 此时使用nrm切换npm数据源为npm。

发布

  • 在项目下的cmd执行 npm login,按照提示输入enter键,此时会弹出npm登录界面。
  • 输入准备好的npm账号密码,并在输入邮箱的登陆校验码即可。
  • 此时回到shell界面,输入npm publish。成功界面如下:

npm notice npm notice package: [email protected] npm notice === Tarball Contents === npm notice 187B index.js npm notice 228B package.json npm notice === Tarball Details === npm notice name: npm-text-qdh npm notice version: 1.0.0 npm notice filename: npm-text-qdh-1.0.0.tgz npm notice package size: 379 B npm notice unpacked size: 415 B npm notice shasum: 78668c68732ee18f8679a9d20d618671a8322970 npm notice integrity: sha512-XPNzagKyZiu2n[...]SOZz4Ph1vCi1A== npm notice total files: 2 npm notice npm notice Publishing to https://registry.npmjs.org/ with tag latest and default access + [email protected] 出现上面加粗的内容则表示发布成功,在npm.js官网搜索你发布包的名称即可。

版本修改

  • 直接运行npm version major更改大版本, 1.0.0 --> 2.0.0;运行npm version minor更改次版本, 2.0.0 --> 2.1.0;运行npm vsersion patch更改修订版本, 2.1.0 --> 2.1.1

  • 然后运行npm pubulish进行发布