comall-backend-design-test
v1.0.0-alpha-22
Published
本项目为移动端可视化配置功能管理后台基础库。该项目旨在提供一种所见即所得的方式对移动端页面进行管理,降低开发、维护及运营成本。
Downloads
59
Readme
可视化配置后台管理界面
本项目为移动端可视化配置功能管理后台基础库。该项目旨在提供一种所见即所得的方式对移动端页面进行管理,降低开发、维护及运营成本。
本项目为可视化管理后台部分,其中包含:
如何使用
通过提供标准的 `JSON` 页面结构数据,由移动端库渲染为对应的业务功能组件。在管理后台,由 `DesignPage` 对移动端组件的配置项进行管理。
你只需要按照 `components-basis` 库提供的 `DesignPage` 参数配置好设计器,可视化页面的设计工作就交由基础库处理了。
基础库默认会提供 10 个功能组件,如果你需要修改默认组件或定制自己的组件,可以通过基础库提供的 `ApplicationConfigForm` 对配置表单进行注册和追加修改。
设置私有 NPM 镜像
在命令行中执行 npm config set registry http://nexus3.km.co-mall/repository/npm/
;
启动开发环境
- 安装
node.js
版本10.16.3
; - 安装
yarn
,在命令行中执行npm install -g yarn
; - 在命令行中
cd
到项目根目录; - 执行
yarn install
安装依赖库; - 执行
yarn start
启动开发环境。
发布 DEMO
- 安装
node.js
版本10.16.3
; - 安装
yarn
,在命令行中执行npm install -g yarn
; - 在命令行中
cd
到demo
项目根目录; - 在
demo
目录执行yarn install
安装依赖库; - 设置接入 H5 站地址环境变量,如:
export DESIGN_CLIENT_URL=http://172.16.0.23:8080
- 设置 API 接口地址环境变量(即 Mock 访问地址),如:
export API_ROOT=http://172.16.0.23:4000
- 执行
yarn run build
生成静态资源文件; - 发布的文件存放于
./build
。
启动 Mock 数据
- 在命令行中
cd
到项目根目录,进入根目录下的mock
文件夹; - 在
mock
目录下执行yarn install
; - 设置 Mock 接口访问地址环境变量,如:
export MOCK_HOST=http://172.16.0.23
; - 执行
node app.js
命令启动 Mock 数据 Server ( Mock 数据开启的是 4000 端口 );
发布流程
- 在
dev
分支合并完成所有版本发布内容。 - 修改
package.json
中的版本信息。 - 更新
CHANGELOG.md
中的记录。 - 推送
dev
到远程分支。 - 发起
dev
到master
的合并请求 - 合并到
master
后,新建发布版本的tag
- 在
master
分支下执行yarn login
登录镜像; - 执行
yarn publish
发布模块至镜像。
- 推送至阿里云平台仓库地址为
https://registry-node.aliyun.com/org/1166572487057521/registry/comall/