Browse Source

temp save

gemercheung 4 years ago
parent
commit
015cda85df
7 changed files with 33516 additions and 0 deletions
  1. 29 0
      .gitignore
  2. 109 0
      docs/.vuepress/config.js
  3. 41 0
      docs/Dockerfile
  4. 67 0
      docs/README.md
  5. 11 0
      docs/docker-compose.yml
  6. 33237 0
      package-lock.json
  7. 22 0
      package.json

+ 29 - 0
.gitignore

@@ -0,0 +1,29 @@
+.DS_Store
+node_modules
+/dist
+public/static/scenes
+public/static/models/glb
+package-lock.json
+docs/.vuepress/dist
+docs/node_modules
+docker/dist
+docker/log
+docker/.env
+# local env files
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
+*.bak

+ 109 - 0
docs/.vuepress/config.js

@@ -0,0 +1,109 @@
+const path = require("path");
+const { config, themeConfig } = require("vuepress-theme-hope");
+
+module.exports = config({
+  title: "随心装技术文档",
+  theme: "vuepress-theme-hope",
+  description: "随心装技术文档, 包括2d,3d,硬装部分的详细说明",
+  markdown: {
+    lineNumbers: true // 代码块显示行号
+  },
+  smoothScroll: true,
+  port: 5000,
+  // base: '/ui/',
+  evergreen: true,
+  hostname: "http://test.com",
+  head: [
+    // react 需要 React, ReactDOM 和 Babel 库
+    // vue 只需要 vue 库
+    ["script", { src: "https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js" }]
+  ],
+  // plugins: {
+  //   "@vuepress/medium-zoom": {
+  //     selector: ".theme-note-content img",
+  //     options: {
+  //       margin: 0,
+  //       background: "rgba(0,0,0,.4)"
+  //     }
+  //   },
+  //   "@vuepress/active-header-links": {
+  //     sidebarLinkSelector: ".sidebar-link",
+  //     headerAnchorSelector: ".header-anchor"
+  //   }
+  // },
+  themeConfig: {
+    blog: false,
+    smoothScroll: true,
+    mdEnhance: {
+      tasklist: true,
+      flowchart: true,
+      mermaid: true,
+      demo: true,
+      align: true,
+      mark: true
+    },
+    lastUpdated: "上次更新",
+    // repo: "JackRay-c/vuepress-theme-note",
+
+    docsBranch: "gh-pages",
+
+    editLinkText: "帮助我们改善此页面!",
+
+    displayAllHeaders: true,
+    activeHeaderLinks: true,
+
+    // algolia: {
+    //     apiKey: '005d7d949bd2c403ee056670a5c60044',
+    //     indexName: ''
+    // },
+    nav: [
+      { text: "基础架构", link: "/base/" },
+      { text: "组件", link: "/component/" },
+      { text: "Event", link: "/event/" },
+      { text: "2D", link: "/2d/" },
+      { text: "3D", link: "/3d/" },
+      { text: "硬装部分", link: "/hardfix/" }
+    ],
+    sidebar: {
+      "/base/": [
+        {
+          title: "基础架构", // 必要的
+          collapsable: false, // 可选的, 默认值是 true,建议改为false
+          sidebarDepth: 1, // 可选的, 默认值是 1,建议改为0
+          children: ["", "develop"]
+        }
+      ],
+      "/component/": [
+        {
+          title: "components(组件)",
+          collapsable: false,
+          sidebarDepth: 1,
+          children: ["", "basic", "shared"]
+        }
+      ],
+      "/event/": [
+        {
+          title: "事件", // 必要的
+          collapsable: false, // 可选的, 默认值是 true,建议改为false
+          sidebarDepth: 0, // 可选的, 默认值是 1,建议改为0
+          children: ["inspect","boxstool", "switchView", "moveCanvas"]
+        }
+      ],
+      "/hardfix/": [
+        {
+          title: "目录", // 必要的
+          collapsable: false, // 可选的, 默认值是 true,建议改为false
+          sidebarDepth: 0, // 可选的, 默认值是 1,建议改为0
+          children: ["", "open"]
+        }
+      ]
+    }
+  },
+  configureWebpack: {
+    resolve: {
+      alias: {
+        "@": path.join(__dirname, "../../src/")
+      }
+    }
+  }
+});

+ 41 - 0
docs/Dockerfile

@@ -0,0 +1,41 @@
+FROM node:14-alpine3.13 as builder
+
+# send signal to containers to stop them
+STOPSIGNAL SIGTERM
+# create working directory
+RUN mkdir -p /usr/src/app
+# set working directory
+WORKDIR /usr/src/app
+# copy package.json file to working directory
+# COPY ../../../package.json ./
+# install dependencies with precise, for more stories visit - https://yarnpkg.com/lang/en/docs/cli/install/
+# RUN yarn install --silent --non-interactive --frozen-lockfile --ignore-optional
+RUN npm config set registry https://registry.npm.taobao.org
+RUN npm install vuepress -g
+RUN npm install -D vuepress-theme-hope vuepress
+COPY . .
+# RUN PUBLIC_URL=/ npm run docs:build
+RUN vuepress build 
+
+# FROM nginx:1.19.4-alpine as app
+
+# Add bash
+# RUN apk add --no-cache bash
+
+FROM debian:buster-slim
+
+RUN apt-get update \
+    && apt-get install -y nginx openssl 
+
+RUN rm -rf /usr/share/nginx/html/*
+COPY --from=builder /usr/src/app/docker/nginx.conf /etc/nginx/nginx.conf
+COPY --from=builder /usr/src/app/docker/nginxconfig/general.conf /etc/nginx/general.conf
+COPY --from=builder /usr/src/app/docker/nginxconfig/security.conf /etc/nginx/security.conf
+COPY --from=builder /usr/src/app/.vuepress/dist /usr/share/nginx/html
+# COPY --from=builder /usr/src/app/.env /usr/share/nginx/html/.env
+
+
+EXPOSE 80
+
+STOPSIGNAL SIGTERM
+CMD ["nginx", "-g", "daemon off;"]

+ 67 - 0
docs/README.md

@@ -0,0 +1,67 @@
+---
+home: true
+heroImage: ''
+actionText:
+actionLink: /zh/guide/
+
+features:
+  - title: 基本架构和开发说明
+    details: 主要关于项目情况和开发注意事项
+    link: /base
+
+  - title: 组件说明文档
+    details: 主要基本组件,共胜组件,以及custom的组件使用说明
+    link: /component
+
+  - title: 事件Event 开发说明文档
+    details: 主要是公共事件Event,2d特供事件Event,3d特供事件Event的技术细则
+    link: /event
+
+  - title: 2D canvas开发说明文档
+    details: 主要是canvas和业务使用说明
+    link: /2d
+
+  - title: 3D 开发说明文档
+    details: 主要是3D,webgl等和业务使用说明
+    link: /3d
+
+  - title: 硬装 开发说明文档
+    details: 主要是硬装部分等和业务使用说明
+    link: /3d
+
+footer: MIT Licensed | Copyright © 2019-present
+---
+
+# 项目地址:
+
+::: tip Gogs
+
+http://192.168.0.115:3000/4dkankan/4dkankan_floorplan.git
+
+:::
+
+#  基本业务逻辑图
+
+```mermaid
+
+sequenceDiagram
+    participant 2D
+    participant 3D
+    participant UI
+    participant 服务端
+
+    2D->>+3D: EventBus
+    3D->>-2D: EventBus
+    2D->>+UI: EventBus
+    UI->>-2D: EventBus
+    2D->>+UI: 提供API获取相关数据/执行某些功能
+
+    3D->>+UI: EventBus
+    UI->>-3D: EventBus
+    3D->>+UI: 提供API获取相关数据/执行某些功能
+
+
+    UI->>+服务端: API
+
+
+```

+ 11 - 0
docs/docker-compose.yml

@@ -0,0 +1,11 @@
+
+version: "3.7"
+
+services:
+  docs:
+    container_name: 4dkankan_docs
+    image: 192.168.0.163:8077/sxz/docs:latest
+    ports:
+      - "8066:80"
+    #   - "443:443"
+    restart: "always"

File diff suppressed because it is too large
+ 33237 - 0
package-lock.json


+ 22 - 0
package.json

@@ -0,0 +1,22 @@
+{
+  "name": "bootsrap-spug",
+  "version": "1.0.0",
+  "description": "/bin/bash -c \"$(curl -fsSL http://face3d.4dage.com:7005/zhangyupeng/bootstrap-spug/raw/master/init-frontend.sh)\"",
+  "main": "index.js",
+  "directories": {
+    "doc": "docs"
+  },
+  "scripts": {
+    "doc:serve": "vuepress dev docs"
+  },
+  "repository": {
+    "type": "git",
+    "url": "http://face3d.4dage.com:7005/zhangyupeng/bootstrap-spug.git"
+  },
+  "author": "",
+  "license": "ISC",
+  "devDependencies": {
+    "vuepress": "^1.8.2",
+    "vuepress-theme-hope": "^1.19.0"
+  }
+}