
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
cqin-cli
是一个高度可定制的现代化前端项目脚手架工具,支持快速生成 React 和 Vue 技术栈的初始化项目。提供丰富的配置选项,集成最新技术生态,助力项目快速启动。
npx cqin-cli@latest <project-name>
✔ 请输入项目名称 › my-app
? 选择框架 › - 使用方向键选择 -
❯ React
Vue
? 版本 ›
❯ 18.x (最新)
17.x
? 需要哪些功能 › - 空格选择/取消 -
◉ TypeScript
◯ Pinia/Vuex
◯ 路由系统
◯ 端到端测试
◯ 代码规范
my-app/
├── src/
│ ├── assets/ # 静态资源
│ ├── components/ # 通用组件
│ ├── layouts/ # 布局组件
│ ├── views/ # 页面视图
│ ├── store/ # 状态管理
│ ├── router/ # 路由配置
│ ├── styles/ # 全局样式
│ └── main.{tsx|jsx} # 入口文件
├── cypress/ # 测试用例
├── .husky/ # Git钩子
├── .eslintrc.js # ESLint配置
├── vite.config.ts # Vite配置
└── package.json
// src/router/index.ts
export default createRouter({
history: createWebHistory(),
routes: [
{
path: '/',
component: () => import('@/views/Home.vue'),
meta: { requiresAuth: true }
}
]
})
// src/store/user.ts
export const useUserStore = defineStore('user', {
state: () => ({
name: 'Guest',
token: null
}),
actions: {
async login(credentials) {
// API调用逻辑
}
}
})
// src/styles/_variables.scss
$primary-color: #1890ff;
$breakpoints: (
mobile: 480px,
tablet: 768px,
desktop: 1200px
);
# 启动开发服务器
yarn dev
# 生产环境构建
yarn build
# 预览构建结果
yarn preview
# 执行ESLint检查
yarn lint:js
# 修复样式问题
yarn lint:style
# 格式化所有文件
yarn format
# 运行完整测试
yarn test:e2e
# 交互式测试开发
yarn test:e2e:dev
# CI环境测试
yarn test:e2e:ci
// cypress/e2e/home.cy.js
describe('首页测试', () => {
beforeEach(() => {
cy.visit('/')
})
it('应显示欢迎标语', () => {
cy.get('h1').should('contain', 'Welcome')
})
it('导航栏应包含有效链接', () => {
cy.get('nav a').should('have.length.at.least', 2)
})
})
// cypress.config.js
module.exports = {
e2e: {
baseUrl: 'http://localhost:5173',
setupNodeEvents(on, config) {
// 插件配置
}
}
}
// .eslintrc.js
module.exports = {
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
'vue/multi-word-component-names': 'off',
'react-hooks/exhaustive-deps': 'error'
}
}
# 提交信息格式
<type>(<scope>): <subject>
# 示例
feat(router): 添加动态路由支持
fix(store): 修复用户信息缓存问题
此项目 推荐使用 pnpm 管理依赖(否则可能引发错误),运行前请确保:
# 安装 pnpm(如果未安装)
npm install -g pnpm
# 安装依赖
pnpm install
## 常见问题
### 依赖安装失败
# 尝试以下步骤:
1. 升级Node.js到最新LTS版本
2. 清理缓存: npm cache clean --force
3. 删除lock文件: rm -rf package-lock.json yarn.lock
4. 重新安装: npm install --legacy-peer-deps
检查预处理器loader是否安装
确认样式文件导入路径正确
查看Webpack/Vite配置中的样式处理规则
Fork 主仓库
创建特性分支
git checkout -b feat/awesome-feature
提交符合规范的代码
发起Pull Request
MIT License © 2023 cqin-cli 开发者
更多文档请访问:项目Wiki
FAQs
A CLI tool for managing your project
The npm package @cqin/cli receives a total of 44 weekly downloads. As such, @cqin/cli popularity was classified as not popular.
We found that @cqin/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.