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

create-bh-vue

v1.0.2

Published

Vue 项目模板创建工具,用于快速创建标准化的 Vue 项目

Readme

create-bh-vue

前端工程化项目模板脚手架(Vue 3 + TypeScript + Vite + Element Plus),用于通过命令快速生成标准化的业务项目。

特点:

  • 交互式选择功能模块:ECharts / UnoCSS / 数据埋点(Tracker)
  • 未选择的功能会在生成结果中被真实移除(依赖、配置、源码都会裁剪)
  • 生成后的项目默认使用 pnpm(模板内置 only-allow pnpm

本地运行(开发/调试脚手架)

在本仓库根目录执行:

node ./bin/create-vue-template.js

也可以带项目名(避免先询问项目名):

node ./bin/create-vue-template.js my-app

调试“无交互”模式(适合 CI 或批量生成):

node ./bin/create-vue-template.js my-app --no-echarts --no-unocss --no-tracker --force --description "demo" --author "team"

参数说明:

  • --echarts / --no-echarts:是否包含 ECharts 相关能力(默认:交互模式按选择;无交互默认 true,可用 --no-echarts 关闭)
  • --unocss / --no-unocss:是否包含 UnoCSS(同上)
  • --tracker / --no-tracker:是否包含数据埋点 Tracker(同上)
  • --description "<text>":项目描述(用于写入生成项目的 package.json)
  • --author "<name>":作者(用于写入生成项目的 package.json)
  • --force:目标目录存在时强制覆盖(无交互模式必备)

生成成功后,在新项目目录执行:

pnpm install
pnpm serve

发布 npm 包

1) 检查 package.json

确认根目录 package.json 信息正确:

  • name:包名(例如 create-bh-vue@org/create-bh-vue
  • version:版本号(每次发布需递增)
  • bin:命令名映射(本项目为 create-bh-vue -> ./bin/create-vue-template.js
  • files:发布时包含 bin/templates/

2) 本地预验证(可选但推荐)

打包检查发布内容:

npm pack

会生成一个 .tgz 文件,安装验证:

npm i -g ./create-bh-vue-*.tgz
create-bh-vue my-app

3) 登录与发布

npm login
npm publish

如果是 scope 包并需要公开发布:

npm publish --access public

发布后如何使用

方式 A:npx(推荐,无需全局安装)

npx create-bh-vue

带项目名:

npx create-bh-vue my-app

全参数示例(关闭三个可选模块):

npx create-bh-vue my-app --no-echarts --no-unocss --no-tracker --force --description "demo" --author "team"

方式 B:全局安装

npm i -g create-bh-vue
create-bh-vue my-app

模板目录约定

模板位于:

templates/vue-project/

脚手架会复制该目录到目标目录,并根据用户选择对生成项目做裁剪与替换。