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

method-kit

v1.1.11

Published

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Downloads

291

Readme

这是一个工具库 包含常用的工具方法

docs 内是改工具库的文档 使用(Docusaurus)这个库写的

下个版本

npm version patch

发布

npm publish

删除

npm unpublish 包名 --force

命令更新package.json中的版本号

/* 备注:
    1.这个命令只是改变package.json中的version版本号
  2.命令行输入后会返回改变的版本;
  3.成功后npm publish
 */
// patch:补丁号,修复bug,小变动,如 v1.0.0->v1.0.1
npm version patch
// minor:次版本号,增加新功能,如 v1.0.0-> v1.1.0
npm version minor
// major:主版本号,不兼容的修改,如 v1.0.0 -> v2.0.0
npm version major
// 命令用于将您的npm包版本标记为预发布版本
npm version prerelease 1.3.5 -> 1.3.6-0
/*-preid参数介绍(备注:修改后会自动git提交一个记录)
- alpha: 代表内部测试版,会有很多Bug,是比beta更早的版本,一般不建议对外发布
- beta: 相对alpha版本已有了很大的改进的测试版本
- rc:Release Candidate顾名思义就是正式发布的候选版本。

//  1.8.1 > 1.8.2-alpha.0 正常版本会加1,如果是测试版本只是改后缀
npm version prerelease --preid=alpha
// 1.8.1 > 1.8.2-beta.0 正常版本会加1,如果是测试版本只是改后缀
npm version prerelease --preid=beta
// 1.8.1 > 1.8.2-rc.0 正常版本会加1,如果是测试版本只是改后缀
npm version prerelease --preid=rc
*/

发布测试包

npm publish --tag=beta
npm publish --tag alpha
npm publish --tag rc

// 修改为tag
npm dist-tag add [email protected]  beta
// 修改为latest
npm dist-tag add [email protected] beta latest

单独更新

npm install 包名 @latest
npm i 包名 -f

清理缓存

npm cache clean --force