mirror of
https://github.com/siyuan-note/plugin-sample-vite-svelte.git
synced 2025-08-02 00:23:30 +00:00
readme
This commit is contained in:
parent
efd5d9e945
commit
9e12d15f9a
2 changed files with 22 additions and 14 deletions
27
README.md
27
README.md
|
@ -4,7 +4,7 @@
|
|||
[中文版](./README_zh_CN.md)
|
||||
|
||||
1. Using vite for packaging
|
||||
2. Use soft linking instead of putting the project into the plugins directory program development
|
||||
2. Use symbolic linking instead of putting the project into the plugins directory program development
|
||||
3. Built-in support for the svelte framework
|
||||
4. Provides a github action template to automatically generate package.zip and upload to new release
|
||||
|
||||
|
@ -16,20 +16,29 @@
|
|||
2. Clone your repo to a local development folder at any place
|
||||
- Notice: we **don't recommand** you to place the folder under your `{workspace}/data/plugins/` folder.
|
||||
|
||||
3. Create development soft links
|
||||
3. Create development symbolic links
|
||||
|
||||
- It is recommended to create a symbolic link between your development directory and the plugins directory.
|
||||
- If you have python environment in you device, run the command `python scripts/make_dev_link.py <plugin_dir>`, `<plugin_dir>` is the absolute path to the plugins directory, e.g.
|
||||
- If you have python environment in you device, run the command `python scripts/make_dev_link.py`, input the `<plugin_dir>` i.e. the absolute path to the plugins directory, e.g.
|
||||
|
||||
```powershell
|
||||
>>> sudo python . \scripts\make_dev_link.py "H:\SiYuanDevSpace\data\plugins"
|
||||
>>> python make_dev_link.py
|
||||
Please input the directory of siyuan/data/plugins: H:\SiYuanDevSpace\data\plugins
|
||||
Symlink created: H:\SiYuanDevSpace\data\plugins\plugin-sample
|
||||
```
|
||||
- You may need to run it as administration, normal windows users can first open the command line as administrator and then run it. Or if you have scoop installed in you windows system, you install `scoop install sudo` and run with sudo.
|
||||
- If you haven't installed python in your environment, you can also manually make a soft link
|
||||
- Create directory `dev` in you workspace
|
||||
- Window user use [mklink](https://learn.microsoft.com/windows-server/administration/windows-commands/mklink); and unix user use ln command
|
||||
- Notice: make sure that the name of soft link is same as the name in your plugin.json
|
||||
- If you haven't intalled python, while you are an unix user, you can use `ln` command
|
||||
```sh
|
||||
ln -s ./dev "<plugin_dir>/<plugin_name>"
|
||||
```
|
||||
- Notice: make sure that the name of symbolic link is same as the name in your plugin.json
|
||||
- If you haven't intalled python, while you are a windows user, you can download the `make_dev_link.exe` in release and run it in your workspace (as administrator)
|
||||
- If you haven't intalled python, while you are a windows user, and you don't trust any other exe file, you can make the symlink by your self
|
||||
1. Create a dev folder in your worksapce
|
||||
2. Using use [mklink](https://learn.microsoft.com/windows-server/administration/windows-commands/mklink) command to create symlink
|
||||
```cmd
|
||||
mklink /d "<plugin_dir>\<plugin_name>" "<project_dir>\dev"
|
||||
```
|
||||
- You may need to run it as administration.
|
||||
- As the generated softlink is the same as the plugin name, **do not put the project directory under plugins** (this is contrary to the webpack version)
|
||||
|
||||
4. Install NodeJS and pnpm, then run pnpm i in the command line under your repo folder
|
||||
|
|
|
@ -25,15 +25,14 @@
|
|||
ln -s ./dev "<plugin_dir>/<plugin_name>"
|
||||
```
|
||||
- 注意:要确保符号链接的名称 `plugin_name` 和 plugin.json 中的 name 字段保持一致
|
||||
- 如果您没有安装 python 环境,而且是 windows 用户
|
||||
- 您可以直接下载我们提供的 `make_dev_link.exe` 放在根目录下, 以管理员方式运行
|
||||
- 如果您没有安装 python 环境,而且是 windows 用户, 您可以直接下载我们提供的 `make_dev_link.exe` 放在根目录下, 以管理员方式运行
|
||||
- 如果您没有安装 python 环境,而且是 windows 用户, 而且对外来的 exe 不信任,你也可以手动创建符号链接
|
||||
- 首先手动在工作目录下创建 dev 目录
|
||||
- windows 用户请在**管理员** cmd 环境下 使用 [mklink](https://learn.microsoft.com/windows-server/administration/windows-commands/mklink) 命令, 注意要使用绝对路径
|
||||
1. 首先手动在工作目录下创建 dev 目录
|
||||
2. windows 用户请在**管理员** cmd 环境下 使用 [mklink](https://learn.microsoft.com/windows-server/administration/windows-commands/mklink) 命令, 注意要使用绝对路径
|
||||
```cmd
|
||||
mklink /d "<plugin_dir>\<plugin_name>" "<project_dir>\dev"
|
||||
```
|
||||
- 可能需要使用**管理员身份来运行**上面的命令。unix 用户可以直接 sudo 运行, windows 用户可以首先使用管理员身份打开控制台,然后再运行命令
|
||||
- 可能需要使用**管理员身份**来运行上面的命令
|
||||
- 注意: 由于生成的符号链接和 plugin name 相同,所以不要把工程目录放在 plugins 下(这一点和 plugin-sample 模板相反)
|
||||
|
||||
4. 安装 [NodeJS](https://nodejs.org/en/download) 和 [pnpm](https://pnpm.io/installation),然后在开发文件夹下执行 `pnpm i`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue