-
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5af8a6b
commit dc70648
Showing
8 changed files
with
338 additions
and
350 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ src/**/*.js | |
node_modules | ||
dist | ||
vue.config.js | ||
babel.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,35 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Electron: Main", | ||
"type": "node", | ||
"request": "launch", | ||
"protocol": "inspector", | ||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron", | ||
"windows": { | ||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd" | ||
}, | ||
"preLaunchTask": "electron-debug", | ||
"args": ["--remote-debugging-port=9223", "./dist_electron"], | ||
"outFiles": ["${workspaceFolder}/dist_electron/**/*.js"] | ||
}, | ||
{ | ||
"name": "Electron: Renderer", | ||
"type": "chrome", | ||
"request": "attach", | ||
"port": 9223, | ||
"urlFilter": "http://localhost:*", | ||
"timeout": 30000, | ||
"webRoot": "${workspaceFolder}/src", | ||
"sourceMapPathOverrides": { | ||
"webpack:///./src/*": "${webRoot}/*" | ||
} | ||
} | ||
], | ||
"compounds": [ | ||
{ | ||
"name": "Electron: All", | ||
"configurations": ["Electron: Main", "Electron: Renderer"] | ||
} | ||
] | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Electron: Main", | ||
"type": "node", | ||
"request": "launch", | ||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron", | ||
"windows": { | ||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd" | ||
}, | ||
"preLaunchTask": "electron-debug", | ||
"args": ["--remote-debugging-port=9223", "./dist_electron"], | ||
"outFiles": ["${workspaceFolder}/dist_electron/**/*.js"] | ||
}, | ||
{ | ||
"name": "Electron: Renderer", | ||
"type": "chrome", | ||
"request": "attach", | ||
"port": 9223, | ||
"urlFilter": "http://localhost:*", | ||
"timeout": 30000, | ||
"webRoot": "${workspaceFolder}/src", | ||
"sourceMapPathOverrides": { | ||
"webpack:///./src/*": "${webRoot}/*" | ||
} | ||
} | ||
], | ||
"compounds": [ | ||
{ | ||
"name": "Electron: All", | ||
"configurations": ["Electron: Main", "Electron: Renderer"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
# 贡献指南 | ||
|
||
## 安装与启动 | ||
|
||
1. 使用 [yarn](https://yarnpkg.com/) 安装依赖 | ||
|
||
```bash | ||
yarn install | ||
``` | ||
|
||
然后通过 | ||
|
||
```bash | ||
yarn dev | ||
``` | ||
|
||
启动项目。 | ||
|
||
2. 只跟 Electron 主进程相关的代码请在 `src/main` 目录下添加。只跟渲染进程相关的代码请在 `src/renderer` 目录下添加。两个进程都能使用的代码请在 `src/universal` 目录下添加。 **注意**:渲染进程没有 `Node.js` 能力,所有渲染进程需要用到 `Node.js` 模块相关的代码请在 `src/main/events/picgoCoreIPC.ts` 下添加事件进行处理。 | ||
3. 所有的跨进程事件名请在 `src/universal/events/constants.ts` 里添加。 | ||
4. 所有的全局类型定义请在 `src/universal/types/` 里添加,如果是 `enum`,请在 `src/universal/types/enum.ts` 里添加。 | ||
5. 与图床管理功能相关的代码请在 `src/main/manage`和 `src/renderer/manage`目录下添加。 | ||
|
||
## i18n | ||
|
||
1. 在 `public/i18n/` 下面创建一种语言的 `yml` 文件,例如 `zh-Hans.yml`。然后参考 `zh-CN.yml` 或者 `en.yml` 编写语言文件。并注意,PicList 会通过语言文件中的 `LANG_DISPLAY_LABEL` 向用户展示该语言的名称。 | ||
2. 在 `src/universal/i18n/index.ts` 里添加一种默认语言。其中 `label` 就是语言文件中 `LANG_DISPLAY_LABEL` 的值,`value` 是语言文件名。 | ||
3. 如果是对已有语言文件进行更新,请在更新完,务必运行一遍 `yarn gen-i18n`,确保能生成正确的语言定义文件。 | ||
|
||
## 提交代码 | ||
|
||
1. 请检查代码没有多余的注释、`console.log` 等调试代码。 | ||
2. 提交代码前,请执行命令 `git add . && yarn cz`,唤起 [代码提交规范工具](https://github.com/PicGo/bump-version)。通过该工具提交代码。 | ||
# 贡献指南 | ||
|
||
## 安装与启动 | ||
|
||
1. 使用 [yarn](https://yarnpkg.com/) 安装依赖 | ||
|
||
```bash | ||
yarn | ||
``` | ||
|
||
然后通过 | ||
|
||
```bash | ||
yarn dev | ||
``` | ||
|
||
启动项目。 | ||
|
||
1. 只跟 Electron 主进程相关的代码请在 `src/main` 目录下添加。只跟渲染进程相关的代码请在 `src/renderer` 目录下添加。两个进程都能使用的代码请在 `src/universal` 目录下添加。 | ||
2. 所有的跨进程事件名请在 `src/universal/events/constants.ts` 里添加。 | ||
3. 所有的全局类型定义请在 `src/universal/types/` 里添加,如果是 `enum`,请在 `src/universal/types/enum.ts` 里添加。 | ||
4. 与图床管理功能相关的代码请在 `src/main/manage`和 `src/renderer/manage`目录下添加。 | ||
|
||
## i18n | ||
|
||
1. 在 `public/i18n/` 下面创建一种语言的 `yml` 文件,例如 `zh-Hans.yml`。然后参考 `zh-CN.yml` 或者 `en.yml` 编写语言文件。并注意,PicList 会通过语言文件中的 `LANG_DISPLAY_LABEL` 向用户展示该语言的名称。 | ||
2. 在 `src/universal/i18n/index.ts` 里添加一种默认语言。其中 `label` 就是语言文件中 `LANG_DISPLAY_LABEL` 的值,`value` 是语言文件名。 | ||
3. 如果是对已有语言文件进行更新,请在更新完,务必运行一遍 `yarn i18n`,确保能生成正确的语言定义文件。 | ||
|
||
## 提交代码 | ||
|
||
1. 请检查代码没有多余的注释、`console.log` 等调试代码。 | ||
2. 提交代码前,请执行命令 `git add . && yarn cz`,唤起 [代码提交规范工具](https://github.com/Kuingsmile/node-bump-version)。通过该工具提交代码。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
# Contribution Guidelines | ||
|
||
## Installation and startup | ||
|
||
1. Use [yarn](https://yarnpkg.com/) to install dependencies | ||
|
||
```bash | ||
yarn install | ||
``` | ||
|
||
then pass | ||
|
||
```bash | ||
yarn dev | ||
``` | ||
|
||
Startup project. | ||
|
||
2. Please add code only related to the main process of Electron in the `src/main` directory. Code only related to the rendering process should be added in the `src/renderer` directory. Add code that can be used by both processes in the `src/universal` directory. **Note**: The rendering process does not have the `Node.js` capability. All rendering processes need to use `Node.js modules` related code, please add events under `src/main/events/picgoCoreIPC.ts` for processing. | ||
3. Please add all cross-process event names in `src/universal/events/constants.ts`. | ||
4. Please add all global type definitions in `src/universal/types/`, if it is `enum`, please add it in `src/universal/types/enum.ts`. | ||
5. Code related to the management function of the picture bed should be added in the `src/main/manage` and `src/renderer/manage` directory. | ||
|
||
## i18n | ||
|
||
1. Create a language `yml` file under `public/i18n/`, for example `zh-Hans.yml`. Then refer to `zh-CN.yml` or `en.yml` to write language files. Also note that PicList will display the name of the language to the user via `LANG_DISPLAY_LABEL` in the language file. | ||
2. Add a default language to `src/universal/i18n/index.ts`. where `label` is the value of `LANG_DISPLAY_LABEL` in the language file, and `value` is the name of the language file. | ||
3. If you are updating an existing language file, be sure to run `yarn gen-i18n` after the update to ensure that the correct language definition file can be generated. | ||
|
||
## Submit code | ||
|
||
1. Please check that the code has no extra comments, `console.log` and other debugging code. | ||
2. Before submitting the code, please execute the command `git add . && yarn cz` to invoke [Code Submission Specification Tool](https://github.com/PicGo/bump-version). Submit code through this tool. | ||
# Contribution Guidelines | ||
|
||
## Installation and startup | ||
|
||
1. Use [yarn](https://yarnpkg.com/) to install dependencies | ||
|
||
```bash | ||
yarn | ||
``` | ||
|
||
then pass | ||
|
||
```bash | ||
yarn dev | ||
``` | ||
|
||
Startup project. | ||
|
||
1. Please add code only related to the main process of Electron in the `src/main` directory. Code only related to the rendering process should be added in the `src/renderer` directory. Add code that can be used by both processes in the `src/universal` directory. | ||
2. Please add all cross-process event names in `src/universal/events/constants.ts`. | ||
3. Please add all global type definitions in `src/universal/types/`, if it is `enum`, please add it in `src/universal/types/enum.ts`. | ||
4. Code related to the management function of the picture bed should be added in the `src/main/manage` and `src/renderer/manage` directory. | ||
|
||
## i18n | ||
|
||
1. Create a language `yml` file under `public/i18n/`, for example `zh-Hans.yml`. Then refer to `zh-CN.yml` or `en.yml` to write language files. Also note that PicList will display the name of the language to the user via `LANG_DISPLAY_LABEL` in the language file. | ||
2. Add a default language to `src/universal/i18n/index.ts`. where `label` is the value of `LANG_DISPLAY_LABEL` in the language file, and `value` is the name of the language file. | ||
3. If you are updating an existing language file, be sure to run `yarn i18n` after the update to ensure that the correct language definition file can be generated. | ||
|
||
## Submit code | ||
|
||
1. Please check that the code has no extra comments, `console.log` and other debugging code. | ||
2. Before submitting the code, please execute the command `git add . && yarn cz` to invoke [Code Submission Specification Tool](https://github.com/Kuingsmile/node-bump-version). Submit code through this tool. |
Oops, something went wrong.