| Crates.io | frontend-toolkit |
| lib.rs | frontend-toolkit |
| version | 0.1.7 |
| created_at | 2025-09-18 12:08:26.554808+00 |
| updated_at | 2025-09-24 09:37:40.777215+00 |
| description | 🚀 All-in-one CLI toolkit for frontend developers |
| homepage | |
| repository | https://github.com/kangbo841331654-blip/Frontend-Toolkit |
| max_upload_size | |
| id | 1844604 |
| size | 304,657 |
面向前端开发者的全功能命令行工具包
Frontend Toolkit 是一个基于 Rust 开发的高性能 CLI 工具,旨在提升前端开发效率,集成常用开发任务的自动化能力。
| 功能 | 命令 | 描述 |
|---|---|---|
| Vue3 项目脚手架 | create-vue3 |
创建 Vue3 全家桶项目 (Vue + Router + Pinia + TypeScript) |
| React 项目脚手架 | create-react |
创建 React 全家桶项目 (React + Router + Zustand + TypeScript) |
| 组件生成器 | component |
快速生成 React/Vue 组件模板 |
| 文件压缩 | minify |
压缩 CSS/JS 文件,减小文件体积 |
| JSON 转 TypeScript | json2ts |
将 JSON 数据转换为 TypeScript 接口定义 |
| 依赖分析 | deps |
分析 package.json 依赖结构 |
| 静态文件服务 | serve |
启动本地静态文件服务器 |
# 克隆项目
git clone <repository-url>
cd rust-cli
# 构建项目
cargo build --release
# 运行工具
./target/release/frontend-toolkit --help
# 安装脚手架到本地在项目文件目录中执行
cargo install --path .
#卸载脚手架在项目文件目录中执行
cargo uninstall frontend-toolkit
# 查看版本脚手架版本
frontend-toolkit --version
# 查看所有可用命令
frontend-toolkit --help
# 创建 Vue3 全家桶项目
frontend-toolkit create-vue3 my-app --template full --typescript
# 创建 React 全家桶项目
frontend-toolkit create-react my-react-app --template full --typescript
# 生成 React 组件
frontend-toolkit component Button --framework react
# 压缩 CSS 文件
frontend-toolkit minify -i style.css -o style.min.css -t css
# JSON 转 TypeScript 接口
frontend-toolkit json2ts -i data.json -n UserData -o types.ts
# 创建带路由的 Vue3 项目
frontend-toolkit create-vue3 my-vue-app --template router --typescript
# 创建基础 Vue3 项目
frontend-toolkit create-vue3 simple-app --template basic
# 创建 React 全家桶项目
frontend-toolkit create-react my-react-app --template full --typescript
# 创建基础 React 项目
frontend-toolkit create-react simple-react --template basic
# 生成 React 组件(带样式和测试)
frontend-toolkit component Header --framework react
# 生成 Vue 组件
frontend-toolkit component Sidebar --framework vue
# 压缩 CSS 文件
frontend-toolkit minify -i src/styles/main.css -o dist/main.min.css -t css
# 压缩 JavaScript 文件
frontend-toolkit minify -i src/js/app.js -o dist/app.min.js -t js
Frontend Toolkit 采用模块化设计,核心架构包括:
main.rs):使用 clap 进行命令行参数解析和路由commands/):各功能模块的具体实现utils/):模板引擎、文件操作等通用工具我们欢迎所有形式的贡献!
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)# 安装 Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# 克隆项目
git clone https://gitee.com/kang841331654/Frontend-Toolkit
cd frontend-toolkit
# 安装开发工具
rustup component add clippy rustfmt
# 运行测试
cargo test
# 检查代码风格
cargo clippy
cargo fmt --check
本项目使用 git-cliff 自动生成 changelog,支持基于 Conventional Commits 规范的提交信息自动分类。
# 全局安装
cargo install git-cliff
# 或使用 Makefile
make install-git-cliff
# 生成完整的 changelog
git-cliff --output CHANGELOG.md
# 或使用内置命令
cargo run -- changelog
# 或使用 Makefile
make changelog
# 预览未发布的变更
git-cliff --unreleased
# 或使用内置命令
cargo run -- changelog --preview
# 或使用 Makefile
make changelog-preview
# 使用 Makefile 一键发布(推荐)
make release
# 手动发布
git-cliff --tag v0.1.2 --output CHANGELOG.md
git add CHANGELOG.md
git commit -m "chore(release): prepare for v0.1.2"
git tag v0.1.2
为了让 changelog 自动分类,请使用以下提交信息格式:
feat: 添加新功能 → ✨ 新功能fix: 修复问题 → 🐛 问题修复docs: 更新文档 → 📚 文档perf: 性能优化 → ⚡ 性能优化refactor: 重构代码 → ♻️ 重构test: 添加测试 → 🧪 测试chore: 其他改动 → ⚙️ 其他本项目基于 MIT 许可证 开源。
感谢所有为本项目做出贡献的开发者!
Frontend Toolkit - 让前端开发更高效 🚀