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

cjxjs

v1.2.0

Published

`cjxjs` 是一个面向前端项目的命令行快捷工具,用较短的命令执行开发、构建、发布、依赖安装和 Git 相关操作。

Readme

cjxjs

cjxjs 是一个面向前端项目的命令行快捷工具,用较短的命令执行开发、构建、发布、依赖安装和 Git 相关操作。

环境要求

  • Node.js
  • npm、pnpm、yarn 或 bun 之一
  • Git

安装

在项目目录执行:

npm install

将命令链接到全局后即可使用:

npm link

安装完成后,可以查看帮助:

jx --help

快速开始

默认使用 npm:

jx d

上面的命令等价于:

npm run dev

如果希望改用 pnpm:

jx config package-manager pnpm
jx d

此时 jx d 会执行:

pnpm run dev

命令

基础快捷命令

| 命令 | 默认执行内容 | 说明 | | --- | --- | --- | | jx d | <pm> run dev | 启动开发环境 | | jx t | <pm> run beta | 执行 beta 脚本 | | jx r | <pm> run release | 执行 release 脚本 | | jx b | <pm> run build | 执行构建脚本 | | jx n | <pm> run deploy | 执行发布脚本 | | jx s | <pm> run deploy:sync | 执行同步发布脚本 | | jx link | <pm> link quick-ent f_xgj | 链接公共依赖 | | jx nb | gj-deploy -b | 执行 gj-deploy 发布 |

其中 <pm> 是当前配置的包管理器,默认值为 npm。

组合命令

| 命令 | 执行顺序 | 说明 | | --- | --- | --- | | jxd n | dev -> deploy | 启动开发环境后发布 | | jxt n | beta -> deploy | beta 环境发布 | | jxt nb | beta -> gj-deploy -b | beta 脚本后执行 gj-deploy | | jxb n | build -> deploy | 构建后发布 | | jxb nb | build -> gj-deploy -b | 构建后执行 gj-deploy |

例如:

jxt nb

等价于依次执行:

npm run beta
gj-deploy -b

如果当前包管理器配置为 pnpm,则第一条命令会变为 pnpm run beta。

独立命令

| 命令 | 说明 | | --- | --- | | jxlink | 执行依赖链接 | | jxn | 执行 deploy 脚本 | | jxnb | 执行 gj-deploy -b | | jxs | 执行 deploy:sync 脚本 | | jxa | 根据当前 Git 分支自动执行发布流程 | | jxq | 注册并执行 beta、release、build 相关命令 |

包管理器配置

查看当前包管理器:

jx config
jx config pm

设置包管理器:

jx config package-manager pnpm

也支持以下写法:

jx config pm pnpm
jx config packageManager pnpm

支持的值:

npm
pnpm
yarn
bun

配置文件位置:

~/.cjxjs/config.json

示例内容:

{
  "packageManager": "pnpm"
}

该配置会影响:

  • jx 的脚本快捷命令
  • jxlink、jxn、jxs
  • Git 项目下载后的依赖安装
  • Git 项目的 dev/start 自动启动

Git 项目能力

项目中包含 Git 平台相关能力,当前支持 Gitee 的仓库接口:

  • 选择 Git 平台
  • 使用 token 登录
  • 搜索仓库
  • 选择仓库版本
  • 克隆仓库
  • 安装项目依赖
  • 启动项目

相关缓存默认保存在:

~/.cjxjs/

其中包含 token、Git 平台和登录信息等缓存文件。

公共库路径配置

jx set 用于设置公共库路径:

jx set <公共库路径>

例如:

jx set D:\work\shared-library

自动发布

jxa 会读取当前 Git 分支:

  • beta 分支:自动执行 beta 流程
  • release 分支:自动执行 build 流程
  • 其他分支:提示当前分支暂不支持自动执行

使用:

jxa

开发

项目使用 ES Modules:

{
  "type": "module"
}

主要目录:

.
├── bin/                 # CLI 入口
├── pack/                # 扩展功能
├── utils/               # Git、交互等工具
├── commandObj.js        # 快捷命令定义
├── config.js            # 用户配置读写
└── index.js             # CLI 核心逻辑

注意事项

  • 执行的具体脚本需要存在于当前项目的 package.json 中。
  • pnpm、yarn 或 bun 必须已经安装并可以在终端中直接调用。
  • jx set 当前使用固定的 Windows 公共库路径文件,主要适用于 Windows 环境。
  • npm test 当前仍是项目预留的占位脚本,尚未配置实际测试用例。

包发布

npm version [ | major | minor | patch ]

npm version major 结果0.0.1->1.0.0

npm version minor 结果0.0.1->0.1.0

npm version patch 结果0.0.1->0.0.2

npm version prerelease 结果0.0.1 -> 0.0.2-0