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-ljs-vue-app

v1.0.2

Published

Vue3 + Vite + Pinia + Vue Router + Ant Design Vue 项目脚手架,集成构建优化与代码规范

Readme

create-ljs-vue-app

一个交互式脚手架,创建 Vue 3 + Vite + Pinia + Vue Router + Ant Design Vue 项目,并自动完成版本切换与依赖安装。

安装后使用

发布到 npm 后,通过包管理器直接创建项目(推荐):

npm create ljs-vue-app@latest my-admin
# 或 pnpm create ljs-vue-app my-admin
# 或 npx create-ljs-vue-app my-admin
# 也支持显式 create 子命令:npx create-ljs-vue-app create my-admin

交互式(不传项目名会提示输入):

npm create ljs-vue-app@latest

可选参数:

  • --desc, -d "项目描述":设置项目描述
  • --name, -n my-admin:显式指定项目名
  • --no-install:只生成文件,不安装依赖
  • --force:覆盖已存在且非空的目录

本地开发调试:

node cli.mjs my-admin --desc "后台管理" --no-install

CLI 会依次:

  1. 通过 nvm 切换(或安装)Node 20.20.2;
  2. 将 template/ 复制到目标目录并替换占位符;
  3. 用 pnpm 安装依赖;
  4. 输出启动命令。

模板包含

  • 技术栈:Vue 3.5 / Vite 8 / Pinia 4 / Vue Router 5 / Ant Design Vue 4
  • 构建优化(vite.config.js + plugins/):
    • css / js / img / fonts 分目录输出,配合 hash 文件名;assetsInlineLimit: 0 保证图片全部独立输出;
    • 自研 plugins/imagemin.js:sharp 压缩 png/jpg/webp/avif、svgo 压缩 SVG,均为预编译/纯 JS,无本地编译工具链依赖;
    • manualChunks 拆分 vue / pinia / antd 依赖,配合 Ant Design Vue 按需引入(antd chunk 从 1.3MB 降至约 144KB);
    • 自研 plugins/compress.js 生成 gzip 与 brotli 预压缩文件(路径稳定,无第三方插件的路径 bug)。
  • 工程规范:ESLint 10 flat config、Prettier 3、.editorconfig、.gitignore;
  • 保存即格式化:.vscode/settings.json 配置 formatOnSave 与 ESLint 自动修复(需安装推荐的 VS Code 插件);
  • UI:暗色精密仪表风格首页,含实时构建心跳示波器(Pinia 驱动),桌面/移动自适应。

生成后

cd my-admin
nvm use
pnpm dev      # 开发
pnpm build    # 构建,产物在 dist/
pnpm lint     # 代码检查
pnpm format   # 格式化

npm version patch