From 8ca01d900d3a974ee710e64df1c075dc60d285bd Mon Sep 17 00:00:00 2001 From: muwoo <2424880409@qq.com> Date: Wed, 29 Dec 2021 17:07:12 +0800 Subject: [PATCH] =?UTF-8?q?:memo:=20rubick=20=E5=BC=80=E5=8F=91=E8=80=85?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/.vuepress/config.js | 6 +- docs/docs/guide/README.md | 6 ++ docs/docs/run/README.md | 105 +++++++++++++++++++++++++++++ src/renderer/components/search.vue | 2 +- 4 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 docs/docs/run/README.md diff --git a/docs/docs/.vuepress/config.js b/docs/docs/.vuepress/config.js index aa092fb..1b87a93 100644 --- a/docs/docs/.vuepress/config.js +++ b/docs/docs/.vuepress/config.js @@ -21,12 +21,16 @@ module.exports = { sidebarDepth: 1, // 可选的, 默认值是 1 }, { - title: '开发者', + title: '插件开发', path: '/dev/', }, { title: 'API', path: '/api/', + }, + { + title: '贡献 rubick', + path: '/run/', } ], // 假定是 GitHub. 同时也可以是一个完整的 GitLab URL diff --git a/docs/docs/guide/README.md b/docs/docs/guide/README.md index bf6d592..e2ce44c 100644 --- a/docs/docs/guide/README.md +++ b/docs/docs/guide/README.md @@ -1,3 +1,9 @@ +## 赞助 +`rubick` 是非盈利项目,开源不容易,如果该项目对你有用的话,可以打赏我们喝杯 coffee ☕️. + + + + ## 前言 rubick 之前的插件管理,依托于云服务器存储,我们需要为服务器存储支付一笔不小的开销。 由于项目完全开源,所以几乎无任何收入,所以为了让 rubick 先生存下去,我们再三抉择把插件包管理方式托管到了`npm` 上。 diff --git a/docs/docs/run/README.md b/docs/docs/run/README.md new file mode 100644 index 0000000..a6c991c --- /dev/null +++ b/docs/docs/run/README.md @@ -0,0 +1,105 @@ +## 赞助 +`rubick` 是非盈利项目,开源不容易,如果该项目对你有用的话,可以打赏我们喝杯 coffee ☕️. + + + + +## 贡献代码 +### rubick 目录介绍 + +```shell +. +├── docs # 文档存方目录 +│   ├── docs +│   ├── package-lock.json +│   ├── package.json +│   └── pnpm-lock.yaml +├── feature # 插件市场插件 +│   ├── README.md +│   ├── babel.config.js +│   ├── package-lock.json +│   ├── package.json +│   ├── public +│   ├── src +│   ├── tsconfig.json +│   └── vue.config.js +├── public # rubick __static 目录 +│   ├── favicon.ico +│   ├── feature +│   ├── icons +│   ├── index.html +│   ├── preload.js +│   └── tpl +├── src # rubick 核心源码 +│   ├── common # 一些通用的函数 +│   ├── core # 一些核心的能力,比如 app search +│   ├── main # 主进程 +│   └── renderer # 渲染进程 +├── tpl # rubick 模板插件 +│   ├── README.md +│   ├── babel.config.js +│   ├── package-lock.json +│   ├── package.json +│   ├── public +│   ├── src +│   ├── tsconfig.json +│   └── vue.config.js +├── LICENSE # MIT 协议 +├── README.md # 英文文档 +├── README.zh-CN.md # 中文文档 +├── babel.config.js +├── deploy-doc.sh # rubick doc 发布脚本 +├── tsconfig.json +├── package-lock.json +├── package.json +└── vue.config.js +``` + +### 启动 +#### 1. 安装依赖 +`rubick` 启动主要涉及到3个目录: +1. 根目录:`rubick` 核心进程 +2. feature:`rubick` 内置的插件市场插件 +3. tpl: `rubick` 内置的模板插件 +```shell +$ npm i +$ cd feature && npm i +$ cd tpl && npm i +``` + +#### 2. 启动核心进程 + +```shell +$ npm run electron:serve +``` + +#### 3. 启动插件中心 + +```shell +$ cd feature && npm run serve +``` + +#### 4. 启动模板插件 + +```shell +$ cd tpl && npm run serve +``` + +### 编译 +```shell +$ cd feature && npm run build +$ cd tpl && npm run build +$ npm run electron:build +``` + +### PR + +1. Create an issue about the features, such as new components. +2. Fork the repo to your own account. +3. Clone your fork. +4. Create a new branch base on dev, if you want to add new component, the branch name should be formatted as component-[Component Name]. (e.g. component-steps) And the commit info should be formatted as [Component Name]: Info about commit. +5. Make sure that running npm run prepublish outputs the correct files. +6. Rebase before creating a PR to keep commit history clear. (Merge request to branch dev) +7. Provide some description about your PR. + + diff --git a/src/renderer/components/search.vue b/src/renderer/components/search.vue index f747db2..b256492 100644 --- a/src/renderer/components/search.vue +++ b/src/renderer/components/search.vue @@ -169,7 +169,7 @@ const showSeparate = () => { const changeHideOnBlur = () => { let cfg = { ...config.value }; cfg.perf.common.hideOnBlur = !cfg.perf.common.hideOnBlur; - opConfig.set(cfg.perf); + opConfig.set(cfg); config.value = cfg; };