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

tdesign-publish-cli

v0.0.12

Published

publish-cli

Downloads

4,385

Readme

publish-cli

封装发布时一系列操作,包括:

  • [x] 生成 changelog
  • [x] 根据 changelog 生成企业微信机器人通知内容
  • [x] 生成 Oteam 即时激励企业微信机器人通知内容

Installation

npm i tdesign-publish-cli

Commands

  • changelog 生成项目 changelog
  • robot 生成企微机器人消息模板内容
  • help [command] display help for command

cli 使用样例

tdesign-publish-cli changelog

生成 Changelog

实现原理

cli 依赖 standard-changelog,会根据 git commits 中的 tag 生成 语义化 的发布日志,使用本项功能的前提是你在日常提交 commit 时遵循 Conventional Commits 以生成规范、可读性高的日志内容。

可选依赖

为了保证你的提交信息严格遵循规范,可以在 repo 中结合 huskycz-conventional-changelog 在每次提交前对提交信息进行格式化检测。 配置样例:

// package.json
{
    ...
    "devDependencies": {
        "husky": "^3.1.0",
        "cz-conventional-changelog": "^3.0.2"
    },
    "config": {
        "commitizen": {
            "path": "./node_modules/cz-conventional-changelog"
        }
    },
    "husky": {
        "hooks": {
            "pre-commit": "lint-staged",
            "prepare-commit-msg": "exec < /dev/tty && git cz --hook || true",
            "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
        }
    },
    ...
}

使用

群机器人 webhook 支持 markdown 格式撰写较为美观的消息内容,publish-cli robot 命令中内置了两类模板:

  • 发布日志
  • 即时激励

“发布日志” 类型会从 CHANGELOG.md 中截取本次版本发布的内容生成 md 内容。

“即时激励” 类型在按照步骤补充信息后生成 md 内容。 repo 根目录下会生成 robotMsg.json 文件,将文件内容复制到 Postman 或其他 curl 工具后即可发送消息。 (正式发布内容前建议先使用测试群机器人验证消息,以免发生运营事故。。)