From 1bde62f68a9aa53e7e0be29d83ee58593f8e109f Mon Sep 17 00:00:00 2001
From: xiangheng <11675084@qq.com>
Date: Thu, 13 Jun 2024 14:22:19 +0800
Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E6=8F=8F=E8=BF=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 4 ++--
admin/scripts/build.mjs | 18 ++++++++++++------
x_admin_app/README.md | 4 ++++
x_admin_app/manifest.json | 21 +++------------------
4 files changed, 21 insertions(+), 26 deletions(-)
create mode 100644 x_admin_app/README.md
diff --git a/README.md b/README.md
index d90945a..3657bcd 100644
--- a/README.md
+++ b/README.md
@@ -41,10 +41,10 @@
- 素材管理
- 网站设置
- 图库管理
-- 代码生成器:一键生成前后端业务代码
+- 代码生成器:一键生成前端、后端、app代码
- 审批流:基于`LogicFlow`和`VForm 3`,整体流程已实现,需要细化
-
+


diff --git a/admin/scripts/build.mjs b/admin/scripts/build.mjs
index 4d77390..cba4e93 100644
--- a/admin/scripts/build.mjs
+++ b/admin/scripts/build.mjs
@@ -1,5 +1,6 @@
import { execaCommand } from 'execa'
import path from 'path'
+
import fsExtra from 'fs-extra'
const { existsSync, remove, copy } = fsExtra
const cwd = process.cwd()
@@ -12,22 +13,22 @@ const goProjectPath = path.resolve(cwd, '../server')
async function build_go() {
await execaCommand('swag fmt', {
stdio: 'inherit',
- encoding: 'utf-8',
+ encoding: 'utf8',
cwd: goProjectPath
})
await execaCommand('swag init', {
stdio: 'inherit',
- encoding: 'utf-8',
+ encoding: 'utf8',
cwd: goProjectPath
})
await execaCommand('goreleaser release --snapshot --clean', {
stdio: 'inherit',
- encoding: 'utf-8',
+ encoding: 'utf8',
cwd: goProjectPath
})
}
async function build_frontend() {
- await execaCommand('vite build', { stdio: 'inherit', encoding: 'utf-8', cwd })
+ await execaCommand('npm run prod', { stdio: 'inherit', encoding: 'utf8', cwd })
if (existsSync(releasePath)) {
await remove(releasePath)
}
@@ -35,12 +36,17 @@ async function build_frontend() {
try {
await copyFile(distPath, releasePath)
} catch (error) {
- console.log(`\n ${error}`)
+ console.log(error)
}
console.log(`文件已复制 ==> ${releaseRelativePath}`)
}
async function build() {
- await Promise.allSettled([build_go(), build_frontend()])
+ try {
+ console.log('开始打包')
+ await Promise.allSettled([build_go(), build_frontend()])
+ } catch (error) {
+ console.log(error)
+ }
}
function copyFile(sourceDir, targetDir) {
return new Promise((resolve, reject) => {
diff --git a/x_admin_app/README.md b/x_admin_app/README.md
new file mode 100644
index 0000000..ae05078
--- /dev/null
+++ b/x_admin_app/README.md
@@ -0,0 +1,4 @@
+# 搭配打包工具
+简化打包安卓/ios App、 更改版本号、 wifi调试等
+
+https://www.npmjs.com/package/@adtkcn/hb-cli
diff --git a/x_admin_app/manifest.json b/x_admin_app/manifest.json
index c3a901d..6dad8f6 100644
--- a/x_admin_app/manifest.json
+++ b/x_admin_app/manifest.json
@@ -2,8 +2,8 @@
"name": "x_admin_app",
"appid": "__UNI__FB29F21",
"description": "",
- "versionName": "1.0.2",
- "versionCode": 102,
+ "versionName": "1.0.3",
+ "versionCode": 103,
"transformPx": false,
"app-plus": {
"compatible": {
@@ -86,22 +86,7 @@
}
},
"nvueLaunchMode": "",
- "nativePlugins": {
- "usb-serial-for-uniapp": {
- "__plugin_info__": {
- "name": "usb-serial-for-uniapp",
- "description": "uniapp的USB串口通信插件,驱动基于开源项目usb-serial-for-android,无需ROOT,支持OTG USB串口、CP210X、CH34X等",
- "platforms": "Android",
- "url": "https://ext.dcloud.net.cn/plugin?id=13935",
- "android_package_name": "uni.UNIFB29F21",
- "ios_bundle_id": "",
- "isCloud": true,
- "bought": 1,
- "pid": "13935",
- "parameters": {}
- }
- }
- }
+ "nativePlugins": {}
},
"quickapp": {},
"mp-weixin": {