更新 README,指明 node 版本在 18 以上

This commit is contained in:
frostime 2023-05-30 21:39:25 +08:00
parent 876ee9c62f
commit 439c2134b6
2 changed files with 9 additions and 4 deletions

View file

@ -20,7 +20,7 @@
- Notice: we **don't recommand** you to place the folder under your `{workspace}/data/plugins/` folder. - Notice: we **don't recommand** you to place the folder under your `{workspace}/data/plugins/` folder.
3. Install NodeJS and pnpm, then run pnpm i in the command line under your repo folder 3. Install NodeJS and pnpm, then run pnpm i in the command line under your repo folder
4. **Auto create development symbolic links** 4. **Auto create development symbolic links** (requires nodejs over version 18)
- Make sure that SiYuan is running - Make sure that SiYuan is running
- Run `pnpm run make-link`, the script will detect all the siyuan workspace, please select the targe workspace and the script will automatically create the symbolic link under the `{workspace}/data/plugins/` folder - Run `pnpm run make-link`, the script will detect all the siyuan workspace, please select the targe workspace and the script will automatically create the symbolic link under the `{workspace}/data/plugins/` folder
```bash ```bash
@ -36,7 +36,7 @@
Got target directory: H:\Media\SiYuan/data/plugins Got target directory: H:\Media\SiYuan/data/plugins
Done! Created symlink H:\Media\SiYuan/data/plugins/plugin-sample-vite-svelte Done! Created symlink H:\Media\SiYuan/data/plugins/plugin-sample-vite-svelte
``` ```
4. **Manually create development symbolic links** 4. **Manually create development symbolic links** (requires nodejs over version 18)
- Open `./scripts/make_dev_link.js` file, set `targetDir` to your SiYuan plugin directory `<siyuan workspace>/data/plugins` - Open `./scripts/make_dev_link.js` file, set `targetDir` to your SiYuan plugin directory `<siyuan workspace>/data/plugins`
- Run `pnpm run make-link`, succeed if following message is shown: - Run `pnpm run make-link`, succeed if following message is shown:
```bash ```bash
@ -50,6 +50,8 @@
5. Execute pnpm run dev for real-time compilation 5. Execute pnpm run dev for real-time compilation
6. Open SiYuan marketplace and enable plugin in downloaded tab 6. Open SiYuan marketplace and enable plugin in downloaded tab
> Notice: as the `make-link` script rely on the `fetch` function, please **ensure that at least version v18 of nodejs is installed** if you want to use make-link script.
## I18n ## I18n
In terms of internationalization, our main consideration is to support multiple languages. Specifically, we need to In terms of internationalization, our main consideration is to support multiple languages. Specifically, we need to

View file

@ -17,7 +17,7 @@
2. 将你的库克隆到本地开发文件夹中 2. 将你的库克隆到本地开发文件夹中
* 注意: 同 `plugin-sample` 不同, 本样例并不推荐直接把代码下载到 `{workspace}/data/plugins/` * 注意: 同 `plugin-sample` 不同, 本样例并不推荐直接把代码下载到 `{workspace}/data/plugins/`
3. 安装 [NodeJS](https://nodejs.org/en/download) 和 [pnpm](https://pnpm.io/installation),然后在开发文件夹下执行 `pnpm i` 安装所需要的依赖 3. 安装 [NodeJS](https://nodejs.org/en/download) 和 [pnpm](https://pnpm.io/installation),然后在开发文件夹下执行 `pnpm i` 安装所需要的依赖
4. **自动创建符号链接** 3. **自动创建符号链接** (需要 nodejs 版本在 18 以上)
- 打开思源笔记, 确保思源内核正在运行 - 打开思源笔记, 确保思源内核正在运行
- 运行 `pnpm run make-link`, 脚本会自动检测所有思源的工作空间, 请在命令行中手动输入序号以选择工作空间 - 运行 `pnpm run make-link`, 脚本会自动检测所有思源的工作空间, 请在命令行中手动输入序号以选择工作空间
```bash ```bash
@ -33,7 +33,7 @@
Got target directory: H:\Media\SiYuan/data/plugins Got target directory: H:\Media\SiYuan/data/plugins
Done! Created symlink H:\Media\SiYuan/data/plugins/plugin-sample-vite-svelte Done! Created symlink H:\Media\SiYuan/data/plugins/plugin-sample-vite-svelte
``` ```
4. **手动创建符号链接** 4. **手动创建符号链接** (需要 nodejs 版本在 18 以上)
- 打开 `./scripts/make_dev_link.js` 文件,更改 `targetDir` 为思源的插件目录 `<siyuan workspace>/data/plugins` - 打开 `./scripts/make_dev_link.js` 文件,更改 `targetDir` 为思源的插件目录 `<siyuan workspace>/data/plugins`
- 运行 `pnpm run make-link` 命令, 如果看到类似以下的消息,说明创建成功: - 运行 `pnpm run make-link` 命令, 如果看到类似以下的消息,说明创建成功:
```bash ```bash
@ -47,6 +47,9 @@
6. 在思源中打开集市并在下载选项卡中启用插件 6. 在思源中打开集市并在下载选项卡中启用插件
> 注意由于使用的 make-link 脚本依赖于 `fetch`,所以如果想要使用 make-link **请保证至少安装 v18 版本的 nodejs**
## 国际化 ## 国际化
国际化方面我们主要考虑的是支持多语言,具体需要完成以下工作: 国际化方面我们主要考虑的是支持多语言,具体需要完成以下工作: