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

@howuse/cimi

v1.0.1

Published

A tool for fully automatic publishing of npm packages

Downloads

4

Readme

npm

移植自:https://www.npmjs.com/package/cimi 对原本cimi进行了部分修改,针对npm组织包发版时,提示tag重复问题进行修复。

Cimi

一款全自动 npm 发包工具,一行命令帮助你 git replase、创建 git tag、发布 npm 包。

Cimi 自动生成新版本号,自动生成 commit message,创建 tag,push 到 github,最后发布到 npm 中,整个过程只需要一行命令,解放你的双手!

Cimi 有什么优势?

当我们在开发组件库或者其他开源工具包时,我们发一个新的 NPM 包可能需要这些工作:

  • 手动修改package.json中的version.
  • git add .git commit -m "xxxx"生成一个提交.
  • git push origin master 推送到远端.
  • 在 github 中打一个新tag.
  • npm publish将代码提交到 NPM.

听起来是不是很麻烦?而有了cimi,你只需要一行简单的代码:

cimi patch main

就可以完成上面所有事情。

Cimi 修改版本规则

Cimi共有五种规则,来进行发包,其实也就是确定版本号。

  • cimi patch 更新一个小版本,如 1.1.0 -> 1.1.1,如 bug 修复;
  • cimi minor 更新一个中版本,如 1.1.0 -> 1.2.0,如新增功能;
  • cimi major 更新一个大版本,如 1.1.0 -> 2.1.0,如重构架构;
  • cimi beta 将当前版本转为 beta 版本,如 1.1.0 -> 1.1.0-beta,如生产前测试;
  • cimi upgradeBeta 将当前 beta 版本升级一次 beta 号,如 1.1.0-beta -> 1.1.0-beta2,如二次测试;

而分支默认为master,如果主分支为其他分支,应这样使用:

cimi patch main

cimi patch dev

当然,也可以通过cimi manual来触发对话模式,允许你手动输入更改版本。

类似这样的:

manual select

该场景适用于频繁更改patchpatch-beta版本号时,当然,更开放的交互更将让你有掌控感,不是吗?[偷笑]~

使用

# 全局安装cimi
npm i cimi -g
# 本地安装cimi
npm i cimi -D

以下是cimi -h的输出:

Usage: cimi [options]

A fully automatic NPM package tool, one line command to help you "git add/commit/push, create git tag, release NPM package"

Options:
  -v, --version  output the version number
  -m,manual      manual select your new package version
  patch          patch your new npm package
  minor          minor your new npm package
  major          major your new npm package
  beta           beta your new npm package
  upgradeBeta    upgrade your npm package new version
  -h, --help     display help for command

  Tip:

    You should run this script in the root directory of you project or run by npm scripts.

  Examples:

    $ cimi manual [branch] (default: master)
    $ cimi patch [branch] (default: master)
    $ cimi minor [branch] (default: master)
    $ cimi major [branch] (default: master)
    $ cimi beta [branch] (default: master)
    $ cimi upgradeBeta [branch] (default: master)