ソースを参照

完善项目配置

shaun-sheep 4 年 前
コミット
186d7a4711

+ 7 - 38
persagy-vue-doc/README.md

@@ -1,17 +1,17 @@
-# sybotan-vue-doc
+# persagy-vue-doc
 
-sybotan-vue-doc 项目提供在 vuepress 文档上引入 git 源代码功能。目前只支持基于 gogs 的 git 仓库。 
+persagy-vue-doc 项目提供在 vuepress 文档上引入 git 源代码功能。目前只支持基于 gogs 的 git 仓库。 
 
 ## 安装
 
-修改项目文件 “package.json”。在 “dependencies” 项目下增加 "sybotan-vue-doc"依赖。
+修改项目文件 “package.json”。在 “dependencies” 项目下增加 "@persagy-vue-doc"依赖。
 
 ``` javascript
   "dependencies": {
 
     ......
 
-    "sybotan-vue-doc": "^1.1.21",
+    "@persagy-vue-doc": "^1.1.21",
 
     ......
 
@@ -31,16 +31,11 @@ npm install
 
 ``` javascript
 import Vue from "vue"
-import SDoc from "sybotan-vue-doc"
-Vue.use(SDoc);
+import PDoc from "persagy-vue-doc"
+Vue.use(PDoc);
 ```
 
-## PCodeGit 组件
-PCodeGit 组件用于在文档中引入 git 代码。例如,以下代码引用 git 仓库 ”libs/sybotan-ts“ 的代码 ”/base/src/core/SObject.ts“。
 
-``` html 
-<PCodeGit repos="libs/sybotan-ts" src="/base/src/core/SObject.ts" lang="javascript"></PCodeGit>
-```
 
 ### 属性
 
@@ -69,7 +64,7 @@ module.exports = {
     devServer: {
         proxy: {
             '/gogs/': {
-                target: 'http://git.sybotan.com',
+                target: 'http://39.106.8.246:3003',
                 ws: true,
                 changeOrigin: true,
                 pathRewrite: {
@@ -91,29 +86,3 @@ module.exports = {
 * pathRewrite: 代理到目标地址后,url 的变更。该例为将 ”/gogs/“ 前缀变更为 ”/“。
 * bypass: 在发出代理请求时执行的动作。示例中是在发出 git 源理请求时,在请求头中加入认证信息。
 * 认证信息后的串为 git 请求的用户名与用户密码。格式为: ”<用户名>:<用户密码>“ 。例如,”gogs:123456“。经过 Base64 加密码后即为上述字符串。
-
-#### nginx 服务器配置
-nginx 的配置文件在 ”/etc/nginx/conf.d/“ 文件夹下。以下示例为文档放在 http://docs.sybotan.com ,gogs 仓库部署在 http://git.sybotan.com 的示例配置。
-
-```
-server {
-    listen         80;
-    server_name    docs.sybotan.com;
-
-    location / {
-        root   /web/docs;
-        index  index.html index.htm;
-    }
-    location /gogs {
-        proxy_pass http://git.sybotan.com;
-        proxy_set_header Authorization "Basic Z29nczoxMjM0NTY=";
-        rewrite  ^/gogs/(.*)$ /$1 break;
-    }
-}
-```
-说明:
-* ”location /gogs“ :该段配置 nginx 的代理。关于 nginx 代理更详细信息请自行在网络上查找相关说明;
-* proxy_pass: 设置 "/gogs/" 前缀被转向的目标地址;
-* proxy_set_header:在发出代理请求时执行时在请求头中加入认证信息。
-* rewrite: 代理到目标地址后,url 的变更。该例为将 ”/gogs/“ 前缀变更为 ”/“。
-

+ 7 - 7
persagy-vue-doc/package-vue.json

@@ -1,21 +1,21 @@
 {
-  "name": "sybotan-vue-doc",
+  "name": "persagy-vue-doc",
   "version": "1.1.26",
-  "description": "Sybotan vuepress 文档扩展组件",
+  "description": "persagy vuepress 文档扩展组件",
   "private": false,
-  "author": "庞利祥  <sybotan@126.com>",
+  "author": "郝洁  <haojie@persagy.com.cn>",
   "license": "MIT",
   "keywords": [
-    "sybotan",
+    "persagy",
     "vue",
     "vuepress",
     "doc",
     "git",
     "database"
   ],
-  "main": "lib/sybotan-vue-doc.umd.min.js",
+  "main": "lib/persagy-vue-doc.umd.min.js",
   "scripts": {
-    "build": "vue-cli-service build --target lib --name sybotan-vue-doc --dest lib src/index.js",
+    "build": "vue-cli-service build --target lib --name persagy-vue-doc --dest lib src/index.js",
     "build:lib": "cross-env NODE_ENV=production webpack --mode production --profile --progress --config webpack.components.config.js",
     "publish": "npm publish",
     "lint": "vue-cli-service lint"
@@ -24,7 +24,7 @@
     "lib"
   ],
   "publishConfig": {
-    "registry": "http://repos.sybotan.com:88/repository/npm-hosted/"
+    "registry": "http://dev.dp.sagacloud.cn:8082/repository/npm-hosted/"
   },
   "dependencies": {
     "axios": "^0.20.0",

+ 1 - 1
persagy-vue-doc/webpack.components.config.js

@@ -16,7 +16,7 @@ const config = {
     output: {
         filename: '[name].js',
         path: __dirname + '/lib',
-        library: 'sybotan-vue-doc',     // 指定的就是你使用 require 时的模块名
+        library: 'persagy-vue-doc',     // 指定的就是你使用 require 时的模块名
         libraryTarget: 'umd',           // libraryTarget 会生成不同umd的代码,可以只是 commonjs 标准的,也可以是指amd标准的,也可以只是通过 script 标签引入的
         umdNamedDefine: true,           // 会对 UMD 的构建过程中的 AMD 模块进行命名。否则就使用匿名的 define
     },