Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from Tencent:master #1

Merged
merged 1 commit into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/admin/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
2、执行如下命令运行管理端

```bash
$ cd magic
$ cd magic-admin
$ npm run admin:run
```

3、访问 http:https://localhost:80
3、访问 http:https://localhost:80 (端口以实际启动的为准)

## 开发调试

Expand Down
4 changes: 2 additions & 2 deletions magic-admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
2、执行如下命令运行管理端

```bash
$ cd magic
$ cd magic-admin
$ npm run admin:run
```

3、访问 http:https://localhost:80
3、访问 http:https://localhost:80 (端口以实际启动的为准)

## 开发调试

Expand Down
1 change: 1 addition & 0 deletions magic-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Magic Admin 可视化搭建平台管理端。magic-admin 为独立项目目录,分为 web 端和 server 端,请按照下面指引操作",
"main": "index.js",
"scripts": {
"admin:run": "chmod u+x setup.sh && ./setup.sh",
"init": "npm run web:install && npm run server:install",
"web:install": "cd web && npm install",
"server:install": "cd server && npm install"
Expand Down
16 changes: 10 additions & 6 deletions magic-admin/setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,28 @@ WORKSPACE=$(dirname "$PWD")
echo ${WORKSPACE}

# 全局安装lerna
tnpm i lerna -g
npm i lerna -g

# magic依赖安装和构建
cd ${WORKSPACE}
tnpm run reinstall
tnpm run build
npm run reinstall
npm run build

echo "magic依赖安装完毕 & 打包完毕"

# 移动runtime打包产物到web
rm -rf ${WORKSPACE}/magic-admin/web/public/runtime
mv -f ${WORKSPACE}/playground/dist/runtime/ ${WORKSPACE}/magic-admin/web/public

echo "移动runtime打包产物到web完毕"

# magic-admin依赖安装
cd ${WORKSPACE}/magic-admin
npm run init

# web构建
cd ${WORKSPACE}/magic-admin/web
tnpm run build
npm run build

echo "web依赖安装完毕"

Expand All @@ -33,7 +38,6 @@ echo "移动web文件到server完毕"

# 运行server
cd ${WORKSPACE}/magic-admin/server
tnpm i pm2 -g
pm2-runtime start pm2.config.js --env production
npm run dev