Skip to content

Commit

Permalink
chore: add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xudafeng committed Jan 6, 2019
1 parent 995abce commit 7f7eaad
Show file tree
Hide file tree
Showing 21 changed files with 163 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ install:
- npm i npminstall && npminstall

script:
- npm run docs:build
- cd ./docs_dist
- git init
- git add --all .
- git commit -m "Travis CI Auto Builder"
- git push --quiet --force https://[email protected]/macacajs/reliable.git master:gh-pages
- cd ..
- MYSQL_PORT=13306 npm run ci

after_script:
Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

---

> 持续交付测试套件
> Macaca 的持续交付服务套件
## 文档

Expand Down
111 changes: 111 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
'use strict';

const macacaEcosystem = require('macaca-ecosystem');

const name = 'reliable';

const title = 'Reliable';

module.exports = {
dest: 'docs_dist',
base: `/${name}/`,

locales: {
'/': {
lang: 'en-US',
title,
description: 'Testing management suite with continuous delivery support.',
},
'/zh/': {
lang: 'zh-CN',
title,
description: 'Macaca 的持续交付服务套件。',
},
},
head: [
['link', {
rel: 'icon',
href: 'https://macacajs.github.io/assets/favicon.ico'
}],
['script', {
async: true,
src: 'https://www.googletagmanager.com/gtag/js?id=UA-49226133-2',
}, ''],
['script', {}, `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-49226133-2');
`],
['style', {}, `
img {
width: 100%;
}
`]
],
serviceWorker: true,
themeConfig: {
repo: `macacajs/${name}`,
editLinks: true,
docsDir: 'docs_src',
locales: {
'/': {
label: 'English',
selectText: 'Languages',
editLinkText: 'Edit this page on GitHub',
lastUpdated: 'Last Updated',
serviceWorker: {
updatePopup: {
message: 'New content is available.',
buttonText: 'Refresh',
},
},
nav: [
{
text: 'Guide',
link: '/guide/'
},
macacaEcosystem.en,
],
sidebar: {
'/guide/': genSidebarConfig('Guide', 'Usage', 'Advanced'),
},
},
'/zh/': {
label: '简体中文',
selectText: '选择语言',
editLinkText: '在 GitHub 上编辑此页',
lastUpdated: '上次更新',
serviceWorker: {
updatePopup: {
message: '发现新内容可用',
buttonText: '刷新',
},
},
nav: [
{
text: '指南',
link: '/zh/guide/'
},
macacaEcosystem.zh,
],
sidebar: {
'/zh/guide/': genSidebarConfig('指南'),
},
},
},
},
};

function genSidebarConfig(guide) {
return [
{
title: guide,
collapsable: false,
children: [
'',
'usage',
],
},
];
}
4 changes: 4 additions & 0 deletions docs/.vuepress/override.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$textColor = #2c3e50
$borderColor = #eaecef
$accentColor = #ee6723
$codeBgColor = #282c34
15 changes: 15 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---

home: true
heroImage: https://macacajs.github.io/reliable-logo/svg/logo-2.svg
actionText: Try it Out →
actionLink: /guide/
footer: MIT Licensed | Copyright © 2015-present Macaca

---

::: tip
UITest support running in the browser.
:::

![](http://ww3.sinaimg.cn/large/6d308bd9gw1f6wsic5dmxj20rl0qqtbi.jpg)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/guide/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Introduction


15 changes: 15 additions & 0 deletions docs/zh/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---

home: true
heroImage: https://macacajs.github.io/reliable-logo/svg/logo-2.svg
actionText: 使用文档
actionLink: /zh/guide/
footer: MIT Licensed | Copyright © 2015-present Macaca

---

::: tip
当然,UITest 也支持在命令行环境运行。
:::

![](http://ww1.sinaimg.cn/large/6d308bd9gw1f6wsibnfldg20nk0gr7kg.gif)
1 change: 1 addition & 0 deletions docs/zh/guide/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 简单介绍
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
"eslint-config-antife": "^1.0.3",
"eslint-config-egg": "^6.0.0",
"git-contributor": "^1.0.8",
"macaca-ecosystem": "*",
"mysql2": "^1.6.4",
"sinon": "^6.1.4",
"uuid": "^3.3.2"
"uuid": "^3.3.2",
"vuepress": "^0.14.8"
},
"engines": {
"node": ">=8.9.0"
Expand Down Expand Up @@ -55,7 +57,9 @@
"db:seed:all": "sequelize db:seed:all",
"db:seed:undo:all": "sequelize db:seed:undo:all",
"migration:generate": "sequelize migration:generate --name",
"seed:generate": "sequelize seed:generate --name"
"seed:generate": "sequelize seed:generate --name",
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 7f7eaad

Please sign in to comment.