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

mfy-clis

v1.1.0

Published

脚手架脚本初探

Readme

mfy-clis

一个简单易用的前端项目脚手架工具,帮助您快速初始化项目。

📋 功能特性

  • 🚀 快速初始化项目
  • 📦 支持多种模板选择
  • 🎨 交互式项目配置
  • 📝 自动生成项目文件
  • ⚡ 基于 Commander.js 的命令行工具

🛠️ 支持的模板

  • vue3-vite: 基于 Vue 3 + Vite 的现代化项目模板
  • react-vite: 基于 React + Vite 的高性能项目模板

📦 安装

全局安装(推荐)

npm install mfy-clis -g

本地开发调试

# 克隆项目
git clone <your-repo-url>
cd mfyFe-cli

# 安装依赖
npm install

# 链接到全局
npm link

🚀 使用方法

基本语法

mfy-clis init <project-name>

快速开始

  1. 创建新项目

    mfy-clis init my-awesome-project
  2. 选择模板

    执行命令后,会弹出交互式选择界面:

    ? 选择模板 (Use arrow keys)
    ❯ vue3-vite
      react-vite
  3. 配置项目信息

    根据提示输入项目配置:

    ? 项目名称 (webpack)
    ? 版本号 (1.0.0)
    ? 项目描述 (mfy脚手架项目)
    ? 作者 (SunnyRun)
  4. 完成初始化

    脚手架会自动下载模板并生成项目文件:

    ✔ 创建成功:
    进入项目目录:cd my-awesome-project
    安装依赖: yarn setup
    启动项目: yarn dev

📖 详细示例

示例 1: 创建 Vue 3 项目

# 初始化项目
mfy-clis init my-vue-app

# 选择 vue3-vite 模板
# 配置项目信息
# 进入项目目录
cd my-vue-app

# 安装依赖
yarn setup

# 启动开发服务器
yarn dev

示例 2: 创建 React 项目

# 初始化项目
mfy-clis init my-react-app

# 选择 react-vite 模板
# 配置项目信息
# 进入项目目录
cd my-react-app

# 安装依赖
yarn setup

# 启动开发服务器
yarn dev

示例 3: 在当前目录创建项目

# 进入目标目录
mkdir my-project && cd my-project

# 使用当前目录名作为项目名
mfy-clis init my-project

# 当检测到目录名相同时,会询问是否在当前目录创建
? 当前目录和所创建目录相同,是否在当前目录创建脚手架? (Y/n)

⚙️ 命令选项

查看版本

mfy-clis -v
# 或
mfy-clis --version

查看帮助

mfy-clis --help

🔧 项目结构

mfyFe-cli/
├── bin/                      # 可执行文件
│   ├── mfy-clis.js          # 主命令入口
│   └── mfy-clis-init.js     # 初始化命令
├── lib/                      # 核心功能模块
│   ├── download.js          # 模板下载逻辑
│   ├── generator.js         # 项目生成器
│   └── inquirer.js          # 交互式询问
├── package.json             # 项目配置
└── README.md               # 使用说明

🤝 贡献指南

  1. Fork 项目
  2. 创建功能分支 (git checkout -b feature/AmazingFeature)
  3. 提交更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 打开 Pull Request

📝 许可证

本项目采用 ISC 许可证。详见 LICENSE 文件。

👨‍💻 作者

SunnyRun

🎯 版本历史

  • 1.0.0 - 初始版本
    • 支持 Vue 3 + Vite 模板
    • 支持 React + Vite 模板
    • 交互式项目配置
    • 自动项目生成

🔮 未来计划

  • [ ] 添加更多框架模板支持
  • [ ] 支持自定义模板配置
  • [ ] 添加项目更新功能
  • [ ] 支持插件系统

❓ 常见问题

Q: 如何添加自定义模板?

A: 目前需要修改 lib/download.js 文件中的 URL 配置。未来版本将支持配置文件方式添加自定义模板。

Q: 支持哪些 Node.js 版本?

A: 建议使用 Node.js 14+ 版本以获得最佳体验。

Q: 如何卸载脚手架?

A: 使用 npm uninstall mfy-clis -g 命令卸载。


如果您觉得这个项目有用,请给它一个 ⭐️!