From 527e994752b1fb9243acafaba5f6aed69562d87e Mon Sep 17 00:00:00 2001 From: purocean Date: Mon, 27 Apr 2020 15:24:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=9B=91=E5=90=AC=E7=AB=AF?= =?UTF-8?q?=E5=8F=A3=E5=91=BD=E4=BB=A4=E8=A1=8C=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- help/FEATURES.md | 13 +++++++------ src/app.ts | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/help/FEATURES.md b/help/FEATURES.md index a0cdc404..b820caaa 100644 --- a/help/FEATURES.md +++ b/help/FEATURES.md @@ -299,12 +299,13 @@ xml 代码块 第一行注释需要有 `--drawio--` 文字 在向别人交接文档的时候,可以使用脚本,自定义命令行参数启动程序,方便对方查看文档。 名称 | 作用 | 默认值 | 说明 | 示例 ------------------ | ----------- | ----- | ----------------------- | ---- ---readonly | 编辑器只读 | false | true/false | --readonly ---show-status-bar | 显示状态栏 | true | true/false | --show-status-bar=false ---init-repos | 初始仓库列表 | 无 | json 字符串,注意命令行转义 | --init-repos='{\"test\":\"D:/test\",\"b\":\"E:/test\"}' ---init-repo | 初始仓库名 | 无 | 字符串 | --init-repo='test' ---init-file | 加载文件路径 | 无 | 文件路径,相对于仓库路径 | --init-file='/1.md' +----------------- | ------------ | ----- | ----------------------- | ---- +--port | 服务器监听端口 | 3044 | 端口 | --port=8080 +--readonly | 编辑器只读 | false | true/false | --readonly +--show-status-bar | 显示状态栏 | true | true/false | --show-status-bar=false +--init-repos | 初始仓库列表 | 无 | json 字符串,注意命令行转义 | --init-repos='{\"test\":\"D:/test\",\"b\":\"E:/test\"}' +--init-repo | 初始仓库名 | 无 | 字符串 | --init-repo='test' +--init-file | 加载文件路径 | 无 | 文件路径,相对于仓库路径 | --init-file='/1.md' ## 其他 1. 转换单个外链图片到本地:`Ctrl + Shift + 单击图片` diff --git a/src/app.ts b/src/app.ts index e367aca3..ea2889e7 100644 --- a/src/app.ts +++ b/src/app.ts @@ -10,7 +10,7 @@ const opn = require('opn') let isDev = false -const backendPort = 3044 +const backendPort = Number(yargs.argv.port) || 3044 const devFrontendPort = 8066 const getUrl = () => {