# coderhxl **Repository Path**: coderhxl/coderhxl ## Basic Information - **Project Name**: coderhxl - **Description**: coderhxl 是一个快速搭建和开发前端项目的 CLI 。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-06-17 - **Last Updated**: 2022-09-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #
coderhxl
coderhxl 是一个快速搭建和开发前端项目的 CLI 。 语言: **简体中文** | English ## 为什么要使用 coderhxl 无需每次创建项目都要从零构建, 减少重复工作。 * 通过 coderhxl 创建的项目是基于 Vite , 并且做了很多配置, 比如: 对 axios 进行封装, 动态导入路由配置。详情在 Vue 部分 。 * 在一个项目中, 必定要创建很多组件, 同时也需要配置对应的路由。比如有 15 个, 依次创建组件再配置路由必然是个重复工作, 效率低。 而通过 coderhxl 的一条命令,一键创建一个组件并自动配置路由再搭配 coderhxl 配置的自动导入路由功能给 vue-router 导入所有路由配置, 效率高。 ## 安装 使用 NPM: ```shell npm install coderhxl -g ``` 使用 Yarn: ```shell yarn add coderhxl -g ``` 使用 PNPM: ```shell pnpm add coderhxl -g ``` ##

Vue 项目

coderhxl 目前支持 Vue 项目, 后续会考虑 React 项目。 ### 创建项目 项目配置: - 常见的目录结构 - vite.config.js (配置别名) - axios (axios 的安装和配置, 进行了二次封装) - vue-router (vue-router 的安装和配置, 采用动态导入路由) - Pinia (Pinia 的安装和配置) ```shell coderhxl create ``` ### 创建组件 创建的组件使用的是