forked from MrXujiang/h5-Dooring
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
76 changed files
with
24,301 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-US"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1"> | ||
<title>h5-dooring</title> | ||
<meta name="generator" content="VuePress 1.8.0"> | ||
|
||
<meta name="description" content=""> | ||
|
||
<link rel="preload" href="/doc/assets/css/0.styles.690c58c3.css" as="style"><link rel="preload" href="/doc/assets/js/app.90eae5ac.js" as="script"><link rel="preload" href="/doc/assets/js/19.67f92c26.js" as="script"><link rel="prefetch" href="/doc/assets/js/10.54d9780e.js"><link rel="prefetch" href="/doc/assets/js/11.a67c4713.js"><link rel="prefetch" href="/doc/assets/js/12.f7aa9a93.js"><link rel="prefetch" href="/doc/assets/js/13.f725ef36.js"><link rel="prefetch" href="/doc/assets/js/14.85e93cce.js"><link rel="prefetch" href="/doc/assets/js/15.751a6d56.js"><link rel="prefetch" href="/doc/assets/js/16.2c84a15b.js"><link rel="prefetch" href="/doc/assets/js/17.fb942f89.js"><link rel="prefetch" href="/doc/assets/js/18.81ac15ea.js"><link rel="prefetch" href="/doc/assets/js/2.a5de04a4.js"><link rel="prefetch" href="/doc/assets/js/20.1245cec2.js"><link rel="prefetch" href="/doc/assets/js/21.d021ac57.js"><link rel="prefetch" href="/doc/assets/js/22.eb3fcb45.js"><link rel="prefetch" href="/doc/assets/js/23.1324e643.js"><link rel="prefetch" href="/doc/assets/js/24.2ab45118.js"><link rel="prefetch" href="/doc/assets/js/25.883f97db.js"><link rel="prefetch" href="/doc/assets/js/26.be8cffe5.js"><link rel="prefetch" href="/doc/assets/js/27.df90f08c.js"><link rel="prefetch" href="/doc/assets/js/28.188348ab.js"><link rel="prefetch" href="/doc/assets/js/29.c25040d7.js"><link rel="prefetch" href="/doc/assets/js/3.ececc857.js"><link rel="prefetch" href="/doc/assets/js/30.16824e40.js"><link rel="prefetch" href="/doc/assets/js/31.61920c6c.js"><link rel="prefetch" href="/doc/assets/js/32.e620cf6b.js"><link rel="prefetch" href="/doc/assets/js/4.cde629ec.js"><link rel="prefetch" href="/doc/assets/js/5.315fb3a4.js"><link rel="prefetch" href="/doc/assets/js/6.f057afa6.js"><link rel="prefetch" href="/doc/assets/js/7.1eebf944.js"><link rel="prefetch" href="/doc/assets/js/8.26287c92.js"><link rel="prefetch" href="/doc/assets/js/9.50c25808.js"> | ||
<link rel="stylesheet" href="/doc/assets/css/0.styles.690c58c3.css"> | ||
</head> | ||
<body> | ||
<div id="app" data-server-rendered="true"><div class="theme-container"><div class="theme-default-content"><h1>404</h1> <blockquote>That's a Four-Oh-Four.</blockquote> <a href="/doc/" class="router-link-active"> | ||
Take me home. | ||
</a></div></div><div class="global-ui"></div></div> | ||
<script src="/doc/assets/js/app.90eae5ac.js" defer></script><script src="/doc/assets/js/19.67f92c26.js" defer></script> | ||
</body> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
(window.webpackJsonp = window.webpackJsonp || []).push([ | ||
[10], | ||
{ | ||
360: function(t, r, a) { | ||
t.exports = a.p + 'assets/img/dynamic.15a5303a.png'; | ||
}, | ||
391: function(t, r, a) { | ||
'use strict'; | ||
a.r(r); | ||
var n = a(42), | ||
i = Object(n.a)( | ||
{}, | ||
function() { | ||
var t = this, | ||
r = t.$createElement, | ||
n = t._self._c || r; | ||
return n('ContentSlotsDistributor', { attrs: { 'slot-key': t.$parent.slotKey } }, [ | ||
n('h1', { attrs: { id: '组件动态加载' } }, [ | ||
n('a', { staticClass: 'header-anchor', attrs: { href: '#组件动态加载' } }, [ | ||
t._v('#'), | ||
]), | ||
t._v(' 组件动态加载'), | ||
]), | ||
t._v(' '), | ||
n('p', [ | ||
t._v( | ||
'目前H5-Dooring的组件都是通过动态加载的方式引入,好处是我们在页面中只会加载我们需要的组件,不需要的组件不会被加载,这样可以提高页面加载的速度,这样做也会出现一些问题,比如一个长页面,配置了很多组件,那么一个页面加载过程可以会触发多次请求,目前还没有遇到性能问题,但后续会逐渐优化这个问题。', | ||
), | ||
]), | ||
t._v(' '), | ||
n('h2', { attrs: { id: 'umi3提供的dynamic' } }, [ | ||
n('a', { staticClass: 'header-anchor', attrs: { href: '#umi3提供的dynamic' } }, [ | ||
t._v('#'), | ||
]), | ||
t._v(' umi3提供的dynamic'), | ||
]), | ||
t._v(' '), | ||
n('p', [ | ||
t._v( | ||
'目前组件的动态加载我们采用的umi的dynamic方案,基于它我们上层封装了一个组件动态加载器,原理如下:', | ||
), | ||
]), | ||
t._v(' '), | ||
n('img', { attrs: { src: a(360), alt: 'foo' } }), | ||
t._v(' '), | ||
n('p', [ | ||
t._v('具体代码可以参考Dooring的Github地址:'), | ||
n( | ||
'a', | ||
{ | ||
attrs: { | ||
href: 'https://github.com/MrXujiang/h5-Dooring', | ||
target: '_blank', | ||
rel: 'noopener noreferrer', | ||
}, | ||
}, | ||
[t._v('https://github.com/MrXujiang/h5-Dooring'), n('OutboundLink')], | ||
1, | ||
), | ||
]), | ||
]); | ||
}, | ||
[], | ||
!1, | ||
null, | ||
null, | ||
null, | ||
); | ||
r.default = i.exports; | ||
}, | ||
}, | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
(window.webpackJsonp = window.webpackJsonp || []).push([ | ||
[11], | ||
{ | ||
358: function(t, _, v) { | ||
t.exports = v.p + 'assets/img/deploy.d1b1d698.png'; | ||
}, | ||
389: function(t, _, v) { | ||
'use strict'; | ||
v.r(_); | ||
var e = v(42), | ||
a = Object(e.a)( | ||
{}, | ||
function() { | ||
var t = this, | ||
_ = t.$createElement, | ||
e = t._self._c || _; | ||
return e('ContentSlotsDistributor', { attrs: { 'slot-key': t.$parent.slotKey } }, [ | ||
e('p', [t._v('私有化部署需要获取4个核心项目包, 包括')]), | ||
t._v(' '), | ||
e('ul', [ | ||
e('li', [t._v('H5编辑器(h5_plus)')]), | ||
t._v(' '), | ||
e('li', [t._v('H5基座(h5)')]), | ||
t._v(' '), | ||
e('li', [t._v('Dooring管理后台(Dooring-Admin)')]), | ||
t._v(' '), | ||
e('li', [t._v('服务端项目(Server)')]), | ||
]), | ||
t._v(' '), | ||
e('p', [ | ||
t._v('获取以上四个核心源码工程需要满足商业授权协议, 具体可联系作者'), | ||
e( | ||
'a', | ||
{ | ||
attrs: { | ||
href: 'http://h5.dooring.cn/uploads/WechatIMG3_1758e9753e2.jpeg', | ||
target: '_blank', | ||
rel: 'noopener noreferrer', | ||
}, | ||
}, | ||
[t._v('徐小夕'), e('OutboundLink')], | ||
1, | ||
), | ||
]), | ||
t._v(' '), | ||
e('h3', { attrs: { id: '部署架构图' } }, [ | ||
e('a', { staticClass: 'header-anchor', attrs: { href: '#部署架构图' } }, [ | ||
t._v('#'), | ||
]), | ||
t._v(' 部署架构图'), | ||
]), | ||
t._v(' '), | ||
e('img', { attrs: { src: v(358), alt: 'H5-dooring部署' } }), | ||
t._v(' '), | ||
e('p', [t._v('部署流程如下:')]), | ||
t._v(' '), | ||
e('ol', [ | ||
e('li', [t._v('下载4个源码工程, 安装依赖(npm install 或 yarn)')]), | ||
t._v(' '), | ||
e('li', [ | ||
t._v('打包3个前端工程至'), | ||
e('code', [t._v('server')]), | ||
t._v('的static目录下'), | ||
]), | ||
t._v(' '), | ||
e('li', [ | ||
t._v('在'), | ||
e('code', [t._v('server')]), | ||
t._v('下本地运行 '), | ||
e('code', [t._v('yarn start')]), | ||
t._v(' 或 '), | ||
e('code', [t._v('npm start')]), | ||
t._v(' 启动服务端进行本地测试'), | ||
]), | ||
t._v(' '), | ||
e('li', [ | ||
t._v('打包服务端代码, '), | ||
e('code', [t._v('yarn build')]), | ||
t._v(' 生成 '), | ||
e('code', [t._v('dist')]), | ||
t._v(' 目录, 建议使用 '), | ||
e('code', [t._v('pm2')]), | ||
t._v(' 做'), | ||
e('code', [t._v('nodejs')]), | ||
t._v('服务的负载均衡, 运行 '), | ||
e('code', [t._v('pm2 start dist/index.js')]), | ||
t._v('启动生产环境代码'), | ||
]), | ||
]), | ||
t._v(' '), | ||
e('p', [ | ||
t._v('也可以将以上步骤集成到gitlab等CI, CD服务中, 进行自动化打包发布, 或者采用'), | ||
e('code', [t._v('docker')]), | ||
t._v('进行容器化部署.'), | ||
]), | ||
t._v(' '), | ||
e('h3', { attrs: { id: '步骤3-4详细流程' } }, [ | ||
e('a', { staticClass: 'header-anchor', attrs: { href: '#步骤3-4详细流程' } }, [ | ||
t._v('#'), | ||
]), | ||
t._v(' 步骤3.4详细流程'), | ||
]), | ||
t._v(' '), | ||
e('h4', { attrs: { id: '_1-安装项目环境' } }, [ | ||
e('a', { staticClass: 'header-anchor', attrs: { href: '#_1-安装项目环境' } }, [ | ||
t._v('#'), | ||
]), | ||
t._v(' 1. 安装项目环境'), | ||
]), | ||
t._v(' '), | ||
e('p', [ | ||
t._v( | ||
'服务器需提前安装node和pm2, 将本项目上传至服务器指定的目录(如/www/activity), 进入项目目录, 执行:', | ||
), | ||
]), | ||
t._v(' '), | ||
e('div', { staticClass: 'language- extra-class' }, [ | ||
e('pre', { pre: !0, attrs: { class: 'language-text' } }, [ | ||
e('code', [t._v('npm install\n')]), | ||
]), | ||
]), | ||
e('h4', { attrs: { id: '_2-修改项目域名' } }, [ | ||
e('a', { staticClass: 'header-anchor', attrs: { href: '#_2-修改项目域名' } }, [ | ||
t._v('#'), | ||
]), | ||
t._v(' 2. 修改项目域名'), | ||
]), | ||
t._v(' '), | ||
e('p', [ | ||
t._v('进入'), | ||
e('code', [t._v('./src/config/index.js')]), | ||
t._v(', 修改'), | ||
e('code', [t._v('staticPath')]), | ||
t._v('变量为当前服务器域名/ip, 如'), | ||
e('code', [t._v('http://xxx.com')]), | ||
t._v('或'), | ||
e('code', [t._v('http://xxx.com:8080')]), | ||
t._v('(如非80端口)'), | ||
]), | ||
t._v(' '), | ||
e('h4', { attrs: { id: '_3-编译项目' } }, [ | ||
e('a', { staticClass: 'header-anchor', attrs: { href: '#_3-编译项目' } }, [ | ||
t._v('#'), | ||
]), | ||
t._v(' 3. 编译项目'), | ||
]), | ||
t._v(' '), | ||
e('p', [ | ||
t._v('执行'), | ||
e('code', [t._v('npm run build')]), | ||
t._v('编译项目, 生成'), | ||
e('code', [t._v('dist')]), | ||
t._v('目录'), | ||
]), | ||
t._v(' '), | ||
e('h4', { attrs: { id: '_4-运行项目' } }, [ | ||
e('a', { staticClass: 'header-anchor', attrs: { href: '#_4-运行项目' } }, [ | ||
t._v('#'), | ||
]), | ||
t._v(' 4. 运行项目'), | ||
]), | ||
t._v(' '), | ||
e('p', [ | ||
t._v('在项目根目录执行 '), | ||
e('code', [t._v('pm2 start dist/index.js')]), | ||
t._v('启动项目'), | ||
]), | ||
]); | ||
}, | ||
[], | ||
!1, | ||
null, | ||
null, | ||
null, | ||
); | ||
_.default = a.exports; | ||
}, | ||
}, | ||
]); |
Oops, something went wrong.