Browse Source

feat: git标准化提交

2637309949@qq.com 5 years ago
parent
commit
76c7a845bf
7 changed files with 57 additions and 365 deletions
  1. 0 1
      _coverpage.md
  2. 9 9
      _sidebar.md
  3. 0 136
      deploy.md
  4. 0 0
      git/foundation.md
  5. 48 0
      git/standard.md
  6. 0 125
      more-pages.md
  7. 0 94
      quickstart.md

File diff suppressed because it is too large
+ 0 - 1
_coverpage.md


+ 9 - 9
_sidebar.md

@@ -1,14 +1,14 @@
-* [Host网址](/host.md)
+* [Host网址](host.md)
 * Git手册
-    * [快速入门](/git/README.md)
-    * [提交规范](/git/README.md)
+    * [快速入门](git/foundation.md)
+    * [提交规范](git/standard.md)
 * App手册
-    * [快速入门](/app/README.md)
-    * [提交规范](/app/README.md)
+    * [快速入门](app/README.md)
+    * [提交规范](app/README.md)
 * 前端手册
-    * [快速入门](/frontend/README.md)
-    * [提交规范](/frontend/README.md)
+    * [快速入门](frontend/README.md)
+    * [提交规范](frontend/README.md)
 * 后端手册
-    * [协程并发](/backend/goroutine.md)
+    * [协程并发](backend/goroutine.md)
 * 运维手册
-    * [k3s入门](/oper/k3s.md)
+    * [k3s入门](oper/k3s.md)

+ 0 - 136
deploy.md

@@ -1,136 +0,0 @@
-# Deploy
-
-Similar to [GitBook](https://www.gitbook.com), you can deploy files to GitHub Pages, GitLab Pages or VPS.
-
-## GitHub Pages
-
-There're three places to populate your docs for your Github repository:
-
-- `docs/` folder
-- master branch
-- gh-pages branch
-
-It is recommended that you save your files to the `./docs` subfolder of the `master` branch of your repository. Then select `master branch /docs folder` as your Github Pages source in your repositories' settings page.
-
-![github pages](_images/deploy-github-pages.png)
-
-!> You can also save files in the root directory and select `master branch`.
-You'll need to place a `.nojekyll` file in the deploy location (such as `/docs` or the gh-pages branch)
-
-## GitLab Pages
-
-If you are deploying your master branch, include `.gitlab-ci.yml` with the following script:
-
-?> The `.public` workaround is so `cp` doesn't also copy `public/` to itself in an infinite loop.
-
-```YAML
-pages:
-  stage: deploy
-  script:
-  - mkdir .public
-  - cp -r * .public
-  - mv .public public
-  artifacts:
-    paths:
-    - public
-  only:
-  - master
-```
-
-!> You can replace script with `- cp -r docs/. public`, if `./docs` is your Docsify subfolder.
-
-## Firebase Hosting
-
-!> You'll need to install the Firebase CLI using `npm i -g firebase-tools` after signing into the [Firebase Console](https://console.firebase.google.com) using a Google Account.
-
-Using Terminal determine and navigate to the directory for your Firebase Project - this could be `~/Projects/Docs` etc. From there, run `firebase init`, choosing `Hosting` from the menu (use **space** to select, **arrow keys** to change options and **enter** to confirm). Follow the setup instructions.
-
-You should have your `firebase.json` file looking similar to this (I changed the deployment directory from `public` to `site`):
-
-```json
-{
-  "hosting": {
-    "public": "site",
-    "ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
-  }
-}
-```
-
-Once finished, build the starting template by running `docsify init ./site` (replacing site with the deployment directory you determined when running `firebase init` - public by default). Add/edit the documentation, then run `firebase deploy` from the base project directory.
-
-## VPS
-
-Try following nginx config.
-
-```nginx
-server {
-  listen 80;
-  server_name  your.domain.com;
-
-  location / {
-    alias /path/to/dir/of/docs/;
-    index index.html;
-  }
-}
-```
-
-## Netlify
-
-1.  Login to your [Netlify](https://www.netlify.com/) account.
-2.  In the [dashboard](https://app.netlify.com/) page, click **New site from Git**.
-3.  Choose a repository where you store your docs, leave the **Build Command** area blank, fill in the Publish directory area with the directory of your `index.html`, for example it should be docs if you populated it at `docs/index.html`.
-
-### HTML5 router
-
-When using the HTML5 router, you need to set up redirect rules that redirect all requests to your `index.html`, it's pretty simple when you're using Netlify, create a file named `_redirects` in the docs directory, add this snippet to the file and you're all set:
-
-```sh
-/*    /index.html   200
-```
-
-## ZEIT Now
-
-1. Install [Now CLI](https://zeit.co/download), `npm i -g now`
-2. Change directory to your docsify website, for example `cd docs`
-3. Deploy with a single command, `now` 
-
-## AWS Amplify
-
-1. Set the routerMode in the Docsify project `index.html` to *history* mode.
-
-```html
-<script>
-    window.$docsify = {
-      loadSidebar: true,
-      routerMode: 'history'
-    }
-</script>
-```
-
-2. Login to your [AWS Console](https://aws.amazon.com).
-3. Go to the [AWS Amplify Dashboard](https://aws.amazon.com/amplify).
-4. Choose the **Deploy** route to setup your project.
-5. When prompted, keep the build settings empty if you're serving your docs within the root directory. If you're serving your docs from a different directory, customise your amplify.yml
-
-```yml
-version: 0.1
-frontend:
-  phases:
-    build:
-      commands: 
-        - echo "Nothing to build"
-  artifacts:
-    baseDirectory: /docs
-    files:
-      - '**/*'
-  cache:
-    paths: []
-
-```
-
-6. Add the following Redirect rules in their displayed order.
-
-| Source address | Target address | Type          |
-|----------------|----------------|---------------|
-| /<*>.md        | /<*>.md        | 200 (Rewrite) |
-| /<*>           | /index.html    | 200 (Rewrite) |        

+ 0 - 0
git/README.md → git/foundation.md


+ 48 - 0
git/standard.md

@@ -0,0 +1,48 @@
+## 分支规范
+一、分支与角色说明
+
+master 分支(主分支) 最新分支
+
+test 分支(测试分支) 测试分支
+
+release 分支(正式分支) 正式分支
+
+二、基于分支开发说明
+
+所有代码的主分支是master, 从git clone下载后进行git fetch, git checkout master, 其次在功能开发时, 如果是并行开发的功能以及未再最新排期的功能需要checkout一个新分支feature开发, 待开发完合并进test分支进行测试环境的测试, 最后合并成release分支,最终打上tag版本标记.
+
+## 提交规范
+以Angular提交规范为准:
+```text
+<type>(<scope>): <subject>
+```
+
+type 用于说明 commit 的类别,只允许使用特定的几个标识。
+
+    feat:新功能(feature)
+    fix:修补bug
+    docs:文档(documentation)
+    style: 格式(不影响代码运行的变动)
+    refactor:重构(即不是新增功能,也不是修改bug的代码变动)
+    test:增加测试
+    chore:构建过程或辅助工具的变动
+    doning: 开发中
+    done: 已完成
+    import:到入库
+
+scope 可选, 用于说明 commit 影响的范围,比如数据层、控制层、视图层等等,视项目不同而不同。
+
+subject 是 commit 目的的简短描述,不超过50个字符。
+
+Example:
+```bash
+git commit -m "feat(影响登录逻辑): 添加图形认证码"
+git commit -m "fix: 修复财务报表清单"
+git commit -m "docs: 添加游戏规则说明文档"
+git commit -m "style: 调整代码格式"
+git commit -m "refactor(影响数据链接): 重构数据层"
+```
+
+
+
+

+ 0 - 125
more-pages.md

@@ -1,125 +0,0 @@
-# More pages
-
-If you need more pages, you can simply create more markdown files in your docsify directory. If you create a file named `guide.md`, then it is accessible via `/#/guide`.
-
-For example, the directory structure is as follows:
-
-```text
-.
-└── docs
-    ├── README.md
-    ├── guide.md
-    └── zh-cn
-        ├── README.md
-        └── guide.md
-```
-
-Matching routes
-
-```text
-docs/README.md        => http://domain.com
-docs/guide.md         => http://domain.com/#/guide
-docs/zh-cn/README.md  => http://domain.com/#/zh-cn/
-docs/zh-cn/guide.md   => http://domain.com/#/zh-cn/guide
-```
-
-## Sidebar
-
-In order to have sidebar, then you can create your own `_sidebar.md` (see [this documentation's sidebar](https://github.com/docsifyjs/docsify/blob/master/docs/_sidebar.md) for an example):
-
-First, you need to set `loadSidebar` to **true**. Details are available in the [configuration paragraph](configuration.md#loadsidebar).
-
-```html
-<!-- index.html -->
-
-<script>
-  window.$docsify = {
-    loadSidebar: true
-  }
-</script>
-<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
-```
-
-Create the `_sidebar.md`:
-
-```markdown
-<!-- docs/_sidebar.md -->
-
-* [Home](/)
-* [Guide](guide.md)
-```
-
-You need to create a `.nojekyll` in `./docs` to prevent GitHub Pages from ignoring files that begin with an underscore.
-
-## Nested Sidebars
-
-You may want the sidebar to update with only navigation to reflect the current directory. This can be done by adding a `_sidebar.md` file to each folder.
-
-`_sidebar.md` is loaded from each level directory. If the current directory doesn't have `_sidebar.md`, it will fall back to the parent directory. If, for example, the current path is `/guide/quick-start`, the `_sidebar.md` will be loaded from `/guide/_sidebar.md`.
-
-You can specify `alias` to avoid unnecessary fallback.
-
-```html
-<script>
-  window.$docsify = {
-    loadSidebar: true,
-    alias: {
-      '/.*/_sidebar.md': '/_sidebar.md'
-    }
-  }
-</script>
-```
-
-!> You can create a `README.md` file in a subdirectory to use it as the landing page for the route.
-
-## Set Page Titles from Sidebar Selection
-
-A page's `title` tag is generated from the _selected_ sidebar item name. For better SEO, you can customize the title by specifying a string after the filename.
-
-```markdown
-<!-- docs/_sidebar.md -->
-* [Home](/)
-* [Guide](guide.md "The greatest guide in the world")
-```
-
-## Table of Contents
-
-Once you've created `_sidebar.md`, the sidebar content is automatically generated based on the headers in the markdown files.
-
-A custom sidebar can also automatically generate a table of contents by setting a `subMaxLevel`, compare [subMaxLevel configuration](configuration.md#submaxlevel).
-
-```html
-<!-- index.html -->
-
-<script>
-  window.$docsify = {
-    loadSidebar: true,
-    subMaxLevel: 2
-  }
-</script>
-<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
-```
-
-## Ignoring Subheaders
-
-When `subMaxLevel` is set, each header is automatically added to the table of contents by default. If you want to ignore a specific header, add `{docsify-ignore}` to it.
-
-```markdown
-# Getting Started
-
-## Header {docsify-ignore}
-
-This header won't appear in the sidebar table of contents.
-```
-
-To ignore all headers on a specific page, you can use `{docsify-ignore-all}` on the first header of the page.
-
-```markdown
-# Getting Started {docsify-ignore-all}
-
-## Header
-
-This header won't appear in the sidebar table of contents.
-```
-
-Both `{docsify-ignore}` and `{docsify-ignore-all}` will not be rendered on the page when used.

+ 0 - 94
quickstart.md

@@ -1,94 +0,0 @@
-# Quick start
-
-It is recommended to install `docsify-cli` globally, which helps initializing and previewing the website locally.
-
-```bash
-npm i docsify-cli -g
-```
-
-## Initialize
-
-If you want to write the documentation in the `./docs` subdirectory, you can use the `init` command.
-
-```bash
-docsify init ./docs
-```
-
-## Writing content
-
-After the `init` is complete, you can see the file list in the `./docs` subdirectory.
-
-* `index.html` as the entry file
-* `README.md` as the home page
-* `.nojekyll` prevents GitHub Pages from ignoring files that begin with an underscore
-
-You can easily update the documentation in `./docs/README.md`, of course you can add [more pages](more-pages.md).
-
-## Preview your site
-
-Run the local server with `docsify serve`. You can preview your site in your browser on `http://localhost:3000`.
-
-```bash
-docsify serve docs
-```
-
-?> For more use cases of `docsify-cli`, head over to the [docsify-cli documentation](https://github.com/docsifyjs/docsify-cli).
-
-## Manual initialization
-
-If you don't like `npm` or have trouble installing the tool, you can manually create `index.html`:
-
-```html
-<!-- index.html -->
-
-<!DOCTYPE html>
-<html>
-<head>
-  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-  <meta name="viewport" content="width=device-width,initial-scale=1">
-  <meta charset="UTF-8">
-  <link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
-</head>
-<body>
-  <div id="app"></div>
-  <script>
-    window.$docsify = {
-      //...
-    }
-  </script>
-  <script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
-</body>
-</html>
-```
-
-If you installed python on your system, you can easily use it to run a static server to preview your site.
-
-```bash
-cd docs && python -m SimpleHTTPServer 3000
-```
-
-## Loading dialog
-
-If you want, you can show a loading dialog before docsify starts to render your documentation:
-
-```html
-  <!-- index.html -->
-
-  <div id="app">Please wait...</div>
-```
-
-You should set the `data-app` attribute if you changed `el`:
-
-```html
-  <!-- index.html -->
-
-  <div data-app id="main">Please wait...</div>
-
-  <script>
-    window.$docsify = {
-      el: '#main'
-    }
-  </script>
-```
-
-Compare [el configuration](configuration.md#el).

Some files were not shown because too many files changed in this diff