{"id":26322757,"url":"https://github.com/code-device/x-build","last_synced_at":"2025-03-15T17:01:55.715Z","repository":{"id":45708658,"uuid":"81782849","full_name":"codexu/x-build","owner":"codexu","description":"A front-end scaffolding built on Vite2 + Vue3 + TypeScript.","archived":false,"fork":false,"pushed_at":"2023-01-11T01:43:48.000Z","size":18612,"stargazers_count":765,"open_issues_count":1,"forks_count":123,"subscribers_count":11,"default_branch":"next","last_synced_at":"2024-10-06T09:13:34.974Z","etag":null,"topics":["pinia","typescript","vite","vue3"],"latest_commit_sha":null,"homepage":"https://code-device.github.io/x-build/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codexu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-13T03:54:56.000Z","updated_at":"2024-09-23T11:41:34.000Z","dependencies_parsed_at":"2023-02-08T21:40:18.158Z","dependency_job_id":null,"html_url":"https://github.com/codexu/x-build","commit_stats":null,"previous_names":["codexu/x-build","code-device/x-build"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codexu%2Fx-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codexu%2Fx-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codexu%2Fx-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codexu%2Fx-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codexu","download_url":"https://codeload.github.com/codexu/x-build/tar.gz/refs/heads/next","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243762264,"owners_count":20343979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pinia","typescript","vite","vue3"],"created_at":"2025-03-15T17:01:41.128Z","updated_at":"2025-03-15T17:01:55.551Z","avatar_url":"https://github.com/codexu.png","language":"TypeScript","readme":"# X-BUILD\n\n一款协助你快速从\"零\"搭建大型应用的前端脚手架。\n\n## 简介\n\n**X-BUILD** 基于 [`vue3`](https://v3.cn.vuejs.org/) + `typescript`，使用 `vite` 构建项目，支持众多的开箱即用的功能和针对项目进行了不同程度的优化，初始模板打包后体积仅为 **150kb / 50kb(gzip)**。它的宗旨是快速创建一套**纯净**却具备强大基础功能的模板，协助开发者自由发挥快速搭建任何类型的项目。\n\n## 文档\n\n[文档地址](https://code-device.github.io/x-build/)\n\n## 如何使用？\n\n### CLI\n\n你可以通过全局安装 `X-BUILD`，它本质上是一款 `CLI` (command-line interface，中文：命令行界面) ，提供了一系列的选项，为你生成一套适合于你的前端开发模板，这套模板已经提供了许多通用的基础功能，为你的项目打下坚实的基础。\n\n### 基于 X-BUILD 打造自己的脚手架\n\n通常情况下，每个团队的习惯不同，尽管 `X-BUILD` 提供了可选项辅助生成个性化模板，但不能满足所有人的需求，所以基于 `X-BUILD` 打造一套自己的脚手架是一个更好的选择，你可以通过 `Fork` 本仓库，修改成你的团队的开发习惯。\n\n## 核心功能\n\n脚手架可以快速帮你创建一份空白模板，提供了许多通用的功能：\n\n### 应用\n\n- 基于文件的路由\n- 提供`环境变量`：开发环境、预生产环境、生产环境\n- 基于 `Pinia` 实现的全局状态管理，更好的支持 TS\n- 提供一个基于 `mitt` 的组件联动交互的解决方案\n- 提供实用 `Hooks`，更多情况下推荐使用 [vueuse](https://vueuse.org/guide/)\n- 基于 `axios` 异步请求封装\n- 基于环境变量的静态资源组件\n- 自动加载 `SVG` 的图标组件，雪碧图打包\n- 页面登录访问权限、指令权限\n- 页面缓存（基于 `keep-alive` 实现）\n- 支持 `gzip`\n- 支持 PWA\n\n### UI\n\n- 布局系统\n- 可选 `Less` 或 `Sass/Scss` 预处理器\n- 根据路由与环境变量自动变化标签栏 Title\n- 静态资源加载页面\n- 页面载入进度条\n\n### 规范\n\n- ESLint **Airbnb** 规范\n- Stylelint\n- husky \u0026 Commitlint\n\n## 浏览器支持\n\n本地开发：推荐使用 \u003cBadge text=\"Chrome\" vertical=\"middle\" /\u003e 最新版浏览器，不支持 Chrome 80 以下版本。\n\n生产环境：支持现代浏览器, **不支持 \u003cBadge type=\"danger\" text=\"IE\" vertical=\"middle\" /\u003e**。\n\n| IE          | Edge            | Firefox         | Chrome          | Safari          |\n| ----------- | --------------- | --------------- | --------------- | --------------- |\n| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |\n\n## 贡献代码\n\n文档代码在项目的 `/document` 中，由于文档中有部分 vue3 的功能演示，所以采用 vuepress2 开发。\n\n有任何修改和建议都可以该项目 pr 和 issue，详情请参考 [贡献代码](/Contribution/README.md)。\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-device%2Fx-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-device%2Fx-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-device%2Fx-build/lists"}