提交 01cd9ec4 作者: 方治民

feat: v0.0.2 更新配置项、字体、文档相关

上级 9e0d2f7e
# APP 名称
VITE_GLOB_APP_NAME = 智慧化工
VITE_GLOB_APP_NAME = Basic APP
# APP 描述
VITE_GLOB_APP_DESCRIPTION = 湖北可赛化工 APP
VITE_GLOB_APP_DESCRIPTION = APP 基础工程
# 可赛化工 APP
# APP 基础工程 (uni-app-vue3)
## 开发规范
[规范说明](./doc/workflow.md)
---
> 项目 Fork 自 [uni-app-vite-ts](https://gitee.com/dcloud/uni-preset-vue/blob/vite-ts)
> **注意事项**: 运行/调试/编译/发布环境使用 `HBuilderX`, 开发工具统一使用 `Visual Studio Code`
## 开发环境
<!-- prettier-ignore -->
- Visual Studio Code [latest](https://code.visualstudio.com)
- HBuilderX [latest](https://www.dcloud.io/hbuilderx.html)
- HBuilderX [alpha](https://www.dcloud.io/hbuilderx.html)
- [常用插件清单](./doc/plugins.md)
## 技术栈
## 开始
[技术栈说明](./doc/technique.md)
## 开发工具说明
<!-- prettier-ignore -->
- [开发规范说明](./doc/workflow.md)
- [技术栈说明](./doc/technique.md)
> 运行/调试/编译/发布环境使用 `HBuilderX`, 开发工具统一使用 `Visual Studio Code`
---
## TODO
......
import type { Plugin } from 'vite'
import { configUniPlugin } from './uni'
import { configAutoImportPlugin } from './autoImport'
import pkg from '../../package.json'
export function createVitePlugins(viteEnv: ViteEnv) {
const { VITE_GLOB_APP_NAME, VITE_GLOB_APP_DESCRIPTION } = viteEnv
console.log('APP 名称: ', VITE_GLOB_APP_NAME)
console.log('APP 描述: ', VITE_GLOB_APP_DESCRIPTION)
const {
VITE_GLOB_APP_NAME,
VITE_GLOB_APP_DESCRIPTION,
VITE_GLOB_API_URL,
VITE_GLOB_API_URL_PREFIX,
} = viteEnv
// 以红色字体输出信息
const color = '\x1b[91m'
console.log()
console.log(color, `APP 版本: v${pkg.version}`)
console.log(color, `APP 名称: ${VITE_GLOB_APP_NAME}`)
console.log(color, `APP 描述: ${VITE_GLOB_APP_DESCRIPTION}`)
console.log(color, `API Doc: ${VITE_GLOB_API_URL}${VITE_GLOB_API_URL_PREFIX}/doc.html`)
// plugins
const vitePlugins: (Plugin | Plugin[])[] = []
......
......@@ -4,11 +4,14 @@ import prettier from 'prettier'
// uni-app
import uni from '@dcloudio/vite-plugin-uni'
// @dcloudio/uni-helper-json
import tags from '@dcloudio/uni-helper-json/dist/tags.json'
/**
* 根据 @dcloudio/uni-helper-json 生成组件 .d.ts 描述文件,对组件进行高亮展示
*/
function generateUniComponentsTypes() {
const tags = fs.readFileSync('./node_modules/@dcloudio/uni-helper-json/dist/tags.json', 'utf8')
const json = JSON.parse(tags)
const components = Object.keys(json).map((key) => `'${key}': typeof HTMLElement`)
const components = Object.keys(tags).map((key) => `'${key}': typeof HTMLElement`)
const content = `
// generated by @dcloudio/uni-helper-json/dist/tags.json
......@@ -21,7 +24,12 @@ function generateUniComponentsTypes() {
export {}
`
const formatted = prettier.format(content, { parser: 'typescript', tabWidth: 4, semi: false })
const formatted = prettier.format(content, {
parser: 'typescript',
tabWidth: 4,
semi: false,
singleQuote: true,
})
fs.writeFileSync('./types/uni-components.d.ts', formatted, 'utf8')
}
......
......@@ -54,7 +54,6 @@ develop 分支之上为权限分支,仅由负责人负责合并代码或创建
#### 常用的 type 类别
<!-- prettier-ignore -->
- `upd`:更新 xxx 功能
- `feat`:新增 xxx 功能
- `fix`:修复 xxx Bug
- `docs`:变更 xxx 文档
......@@ -62,6 +61,7 @@ develop 分支之上为权限分支,仅由负责人负责合并代码或创建
- `refactor`:重构 xxx 功能或方法
- `test`:调试 xxx 功能或新增 xxx 测试用例
- `chore`:构建过程或辅助工具的变动(较少出现,项目构建之初基本已确定好)
- `build`: 发布 v0.0.1 版本
#### subject 简述
......@@ -75,6 +75,5 @@ develop 分支之上为权限分支,仅由负责人负责合并代码或创建
```sh
git commit -m 'feat: 新增用户登录功能'
git commit -m 'upd: 完善用户登录界面交互细节'
git commit -m 'fix: 修复由token问题引起的需要重复登录Bug #1002'
git commit -m 'fix: 修复由 token 问题引起的需要重复登录 Bug #1002'
```
{
"name": "kshg-app",
"version": "0.0.1",
"description": "可赛化工 APP",
"name": "basic-app",
"version": "0.0.2",
"description": "APP 基础工程",
"keywords": [
"chemical",
"kesai",
"kshg",
"可赛化工",
"APP"
"app",
"basic"
],
"repository": {
"type": "git",
"url": "https://gitlab.yiring.com/chemical-kesai/kshg-app.git"
"url": "https://gitlab.yiring.com/basic/basic-uniapp-v3.git"
},
"author": {
"name": "yiring",
"email": "developer@yiring.com",
"name": "ifzm",
"email": "fzm@yiring.com",
"url": "https://yiring.com"
},
"scripts": {
......
......@@ -14,4 +14,8 @@
<style>
/* common css */
/* #ifndef APP-PLUS-NVUE */
/* uni.css - 通用组件、模板样式库,可以当作一套ui库应用 */
@import './common/uni.css';
/* #endif */
</style>
......@@ -4,7 +4,7 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "智慧化工"
"navigationBarTitleText": "Basic APP"
}
}
],
......
......@@ -34,7 +34,7 @@
}
.title {
/* font-size: 36rpx; */
font-size: 36rpx;
color: #8f8f94;
}
</style>
// generated by @dcloudio/uni-helper-json/dist/tags.json
declare module 'vue' {
// uni-app 全局组件高亮
// uni-app 内置组件高亮
export interface GlobalComponents {
block: typeof HTMLElement
view: typeof HTMLElement
......
......@@ -30,6 +30,9 @@ export default ({ mode }: ConfigEnv): UserConfig => {
optimizeDeps: {
include: ['lodash-es', '@vueuse/core'],
},
build: {
sourcemap: true,
},
define: {
__APP__: {
name: pkg.name,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论