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

matias-test-scaffold

v1.0.0

Published

脚手架发布测试

Downloads

3

Readme

test-scaffold

npm搜索 commander

npm发布流程

大致流程如下:

  1. 注册一个npm账户,已有账户的可以跳过这一步
  2. 命令行使用npm login登录npm,需要输入usernamepasswordemail
  3. 使用npm public发布 这一步比较简单,不多说,但是请注意如下几点: 注意
  4. 使用了nrm的需要先将源切换到npm官方源
  5. package.json中有几个字段需要完善:
  • name为发布的包名,不能和npm已有的包重复
  • version为版本信息,每次发布都必须要比线上的版本高
  • homepagebugsrepository也可以添加上
  1. readme.md加入脚手架介绍及使用方法,方便他人使用。如果需要在文档中加入徽标,展示脚手架的下载次数之类的,可以在这里生成

npm link

npm link用来在本地项目和本地npm模块之间建立连接,可以在本地进行模块测试

具体用法:

  1. 项目和模块在同一个目录下,可以使用相对路径

npm link ../module

npm link打包 ./node_modules/.bin/test-run相对路径访问指令 2. 项目和模块不在同一个目录下 cd到模块目录,npm link,进行全局link cd到项目目录,npm link 模块名(package.json中的name) 3. 解除link 解除项目和模块link,项目目录下,npm unlink 模块名 解除模块全局link,模块目录下,npm unlink 模块名

必须要打成全局包才可以使用该命令,打成全局包的命令 npm install . -g 或者 npm link

发布

npm publish

更新自己的NPM包(模块)及readme.md 修改代码和readme.md后,执行命令:

npm version patch npm publish

npm version后面参数说明: patch:小变动,比如修复bug等,版本号变动 v1.0.0->v1.0.1 minor:增加新功能,不影响现有功能,版本号变动 v1.0.0->v1.1.0 major:破坏模块对向后的兼容性,版本号变动 v1.0.0->v2.0.0