xgimi-app-vue3 v0.1.0
******兄弟参考文档写代码保你一路顺风(否则你会难受的想吐)----兄弟们给你的忠告*********
项目介绍:该项目是在 Linux 系统的前端 web 项目 框架:vue3 + ant-design-vue +TS
前期准备 1、vscode 插件整起来 (由于该项目采用 TS 编写、会有很多报错和 eslint 检查;安装以下插件重启编译器遇到报错格式化以下代码能干掉 60%的报错---相信我) typescript 和 eslint 编写项目回报各种错误,你想吐、不过相信我坚持一个月你的代码会严谨很多,编码功力上升一个级别 格式化插件:Prettier & ESLint & TSLint vue3 插件:Vue Language Features (Volar)-----(建议你卸载 vue2.0 的插件 vetur;他们俩之间有点小矛盾影响 volar 发挥)
2、git 提交规范使用了 commitlint commitizen husky (具体可以咨询曾威) 参考文档:https://commitlint.js.org/#/guides-local-setup?id=guide-local-setup 提交规范文件.commitlintrc.js 按照格式提交代码,规范提交流程
有些外部引用的js文件比较大很难转换为TS文件的情况可以转换d.ts;参考自动转换的文档:https://cloud.tencent.com/developer/article/1890444?from=15425
Project setup
npm install
Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build
Lints and fixes files
npm run lint
Customize configuration
*******兄弟你可以按照插件Project Tree; Shift+Ctrl+p,输入 Project Tree,回车键更新下面项目目录********
linux-web
├─ .browserslistrc
├─ .editorconfig
├─ .eslintrc.js // ESLint的配置目录,有什么好的配置项可以在里面添加
├─ .gitignore // git提交目录管控,一般不需要改动
├─ babel.config.js
├─ package-lock.json
├─ package.json //这个都懂吧
├─ public
│ ├─ favicon.ico
│ └─ index.html
├─ README.md
├─ src
│ ├─ App.vue
│ ├─ common //工具库(后期作为独立的npm包放到npm仓库方便其他项目调用,共同维护该组件库)*****请公用组都往里面添加
│ ├─ FocusEngine //阿里巴巴焦点管理,参考文档http://developer.tv.yunos.com/example/fe/01-focus-manager.html#FocusEngine-1
│ └─ websocket //封装的websocket通讯
│ ├─ assets //静态文件图片等
│ │ └─ logo.png
│ ├─ components //组件库
│ │ └─ HelloWorld.vue
│ ├─ main.ts
│ ├─ plugins//组件按需加载仓库
│ ├─ router
│ │ └─ index.ts
│ ├─ shims-vue.d.ts
│ ├─ store //vuex
│ │ └─ index.ts
│ └─ views //项目页面
│ ├─ About.vue
│ └─ Home.vue
└─ tsconfig.json
3 years ago