mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix: 管理端启动文档更新
This commit is contained in:
parent
946016686e
commit
86447ec4a1
@ -23,11 +23,11 @@
|
|||||||
2、执行如下命令运行管理端
|
2、执行如下命令运行管理端
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cd magic
|
$ cd magic-admin
|
||||||
$ npm run admin:run
|
$ npm run admin:run
|
||||||
```
|
```
|
||||||
|
|
||||||
3、访问 http://localhost:80
|
3、访问 http://localhost:80 (端口以实际启动的为准)
|
||||||
|
|
||||||
## 开发调试
|
## 开发调试
|
||||||
|
|
||||||
|
@ -23,11 +23,11 @@
|
|||||||
2、执行如下命令运行管理端
|
2、执行如下命令运行管理端
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cd magic
|
$ cd magic-admin
|
||||||
$ npm run admin:run
|
$ npm run admin:run
|
||||||
```
|
```
|
||||||
|
|
||||||
3、访问 http://localhost:80
|
3、访问 http://localhost:80 (端口以实际启动的为准)
|
||||||
|
|
||||||
## 开发调试
|
## 开发调试
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
"description": "Magic Admin 可视化搭建平台管理端。magic-admin 为独立项目目录,分为 web 端和 server 端,请按照下面指引操作",
|
"description": "Magic Admin 可视化搭建平台管理端。magic-admin 为独立项目目录,分为 web 端和 server 端,请按照下面指引操作",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"admin:run": "chmod u+x setup.sh && ./setup.sh",
|
||||||
"init": "npm run web:install && npm run server:install",
|
"init": "npm run web:install && npm run server:install",
|
||||||
"web:install": "cd web && npm install",
|
"web:install": "cd web && npm install",
|
||||||
"server:install": "cd server && npm install"
|
"server:install": "cd server && npm install"
|
||||||
|
16
magic-admin/setup.sh
Normal file → Executable file
16
magic-admin/setup.sh
Normal file → Executable file
@ -5,23 +5,28 @@ WORKSPACE=$(dirname "$PWD")
|
|||||||
echo ${WORKSPACE}
|
echo ${WORKSPACE}
|
||||||
|
|
||||||
# 全局安装lerna
|
# 全局安装lerna
|
||||||
tnpm i lerna -g
|
npm i lerna -g
|
||||||
|
|
||||||
# magic依赖安装和构建
|
# magic依赖安装和构建
|
||||||
cd ${WORKSPACE}
|
cd ${WORKSPACE}
|
||||||
tnpm run reinstall
|
npm run reinstall
|
||||||
tnpm run build
|
npm run build
|
||||||
|
|
||||||
echo "magic依赖安装完毕 & 打包完毕"
|
echo "magic依赖安装完毕 & 打包完毕"
|
||||||
|
|
||||||
# 移动runtime打包产物到web
|
# 移动runtime打包产物到web
|
||||||
|
rm -rf ${WORKSPACE}/magic-admin/web/public/runtime
|
||||||
mv -f ${WORKSPACE}/playground/dist/runtime/ ${WORKSPACE}/magic-admin/web/public
|
mv -f ${WORKSPACE}/playground/dist/runtime/ ${WORKSPACE}/magic-admin/web/public
|
||||||
|
|
||||||
echo "移动runtime打包产物到web完毕"
|
echo "移动runtime打包产物到web完毕"
|
||||||
|
|
||||||
|
# magic-admin依赖安装
|
||||||
|
cd ${WORKSPACE}/magic-admin
|
||||||
|
npm run init
|
||||||
|
|
||||||
# web构建
|
# web构建
|
||||||
cd ${WORKSPACE}/magic-admin/web
|
cd ${WORKSPACE}/magic-admin/web
|
||||||
tnpm run build
|
npm run build
|
||||||
|
|
||||||
echo "web依赖安装完毕"
|
echo "web依赖安装完毕"
|
||||||
|
|
||||||
@ -33,7 +38,6 @@ echo "移动web文件到server完毕"
|
|||||||
|
|
||||||
# 运行server
|
# 运行server
|
||||||
cd ${WORKSPACE}/magic-admin/server
|
cd ${WORKSPACE}/magic-admin/server
|
||||||
tnpm i pm2 -g
|
npm run dev
|
||||||
pm2-runtime start pm2.config.js --env production
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user