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

platui_tsz

v0.0.3

Published

实现方案:

Readme

实现方案:

可以通过npm publish方式将我们的本地模块上传到远程仓库,我们npm publish发布的时候, 一定是本地文件发布到远程仓库,并且登录到http://registry.npmjs.org (即npm adduser或npmlogin)之后,才可以进行发布。

npm配置

  1. 首先你需要一个npm账户
  1. 本地配置 //npm源 npm config set registry http://registry.npmjs.org //淘宝镜像 npm config set registry http://registry.npm.taobao.org/

npm login Username: 你的账户名 Password: 你的密码(输入时候是不可见的, 一定要确保输入正确 也可使用 npm login -d) Email: 你的邮箱 如果这里都没有问题的话, 你就可以开始发布了, 就不用看第四步了

配置错误
code 401 (简单来说就是你密码错了, 你需要重新输入)
npm ERR! A complete log of this run can be foun(你需要调整下npm的配置, 把淘宝镜像配置修改一下)

创建包项目

  1. 创建一个空的文件
  2. npm init 或者 yarn init
  • 如果不知道,还是先看看前端基础教学吧
  • 这里的name你需要确保线上没有这个包名
  1. package.json下同级目录创建index.js
  • 如果你没有改main的配置的话
  1. index.js中导出自己写的方法
exports.showMsg = function () {
  console.log("This is my first module");
};

发布

敲黑板, 重点来了

npm publish 如果name没有重复, 基本上不会有问题 前往npm查看 https://www.npmjs.com/settings/你的账户名/packages 别直接点进去啊 记得修改

更新发布 如果你修改了index.js中的内容, 想再次提交的话使用 npm version <update_type> update_type 是版本号 npm version 1.0.1 npm publish 错误 npm ERR! code E403(版本和线上的重复了, 修改下就行)

安装依赖

npm i tsz_module yarn add tsz_module