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

@busm/cli

v1.1.8

Published

quickApp business module

Downloads

9

Readme

@busm/cli

欢迎使用@busm/cli快速生成快应用业务单元

安装

npm install @busm/cli -g 

用法

使用前 请配置业务模块的仓库地址

配置仓库

使用busm config命令

busm config -u <url>

参考:

$ busm config -u xxx.com
{ branch: 'g', folder: './components', url: 'xxx.com' }

busm config相关指令参数:

$ busm config --help
Usage: busm config [options]

修改配置文件

Options:
  -u, --url <string>     仓库地址
  -b, --branch <string>  分支
  -f, --folder <string>  文件目录
  -l, --list             文件内容
  -h, --help             display help for command

创建菜单内容

使用busm menu命令

$ busm menu -h
Usage: busm menu [options] [name...]

创建业务菜单

Options:
  -f, --fileUrl <string>  文件地址
  -h, --help              display help for command

例如将某个业务模块输出到某个菜单中

$ busm menu caipu -f ./src/pages/home/tab-1.ux

模块caipu暂未下载

开始下载模块caipu
创建模块: caipu

 [ 'caipu' ]

1. 收集manifest和pkg配置
2. 复制模块文件夹到目标文件夹
3. 修改manifest.json
4. 修改package.json
5. 生成注入配置
6. 注入配置到app.ux中
7. 下载依赖

将多个业务模块输出到某个菜单中, 以菜单的形式

$ busm menu caipu bizhi -f ./src/pages/home/tab-1.ux


开始下载模块bizhi
创建模块: bizhi

 [ 'bizhi' ]

1. 收集manifest和pkg配置
2. 复制模块文件夹到目标文件夹
3. 修改manifest.json
4. 修改package.json
5. 生成注入配置
6. 注入配置到app.ux中
7. 下载依赖

创建业务模块

使用 busm create 命令

busm create <bussiness-module>

<bussiness-module>: 业务组件文件夹名

创建业务模块主要实现下面几个过程:

  • 输出业务模块静态文件到src目录

  • 修改manifest.jsonpackage.json文件

    • manifest: 修改路由配置

    • package: 增加postinstall指令和绑定workspaces

  • 输出注入文件injectModuleConfig.js和git脚本文件removeNodeModules.js

    • injectModuleConfig: 将业务单元相关的全局状态及私有插件注入到主体项目的全局状态中

    • removeNodeModules: 删除冲突的依赖

  • 修改app.ux

    • 将注入配置合并到 export default 导出体中
  • 下载业务单元依赖

  • 删除冲突依赖

更新业务单元文件

使用 busm update

删除业务单元

删除主体项目引入的业务单元资源

使用 busm delete -a

配置文件

根目录使用 busm.config.js 配置多业务单元到相关菜单

module.exports = {
    menu: {
        template: {
            caipu: {
                icon: '',
                name: ''
            }
        }
    }
}