Skip to content

Commit 91a3f59

Browse files
authored
docs: document custom Rstack installation paths (#637)
1 parent 16291e8 commit 91a3f59

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

‎website/docs/en/guide/ide-integration.mdx‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ To recommend the extension to team members who open the repository, add it to th
6666
}
6767
```
6868

69+
### Custom installation path
70+
71+
By default, the extension looks for `rstack` in the workspace folder’s `node_modules` and then searches parent directories. If the `rstack` package is installed elsewhere, use `rstack.rstackCli.packagePath` to specify its location. For example:
72+
73+
```json title=".vscode/settings.json"
74+
{
75+
"rstack.rstackCli.packagePath": "infra/node_modules/rstack"
76+
}
77+
```
78+
79+
Set the path to the `rstack` package directory or its `package.json` file. Relative paths are resolved from the workspace folder. Absolute paths and the `${workspaceFolder}` placeholder are also supported.
80+
6981
## Features
7082

7183
### Linting

‎website/docs/zh/guide/ide-integration.mdx‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ Rstack 目前通过 [Rstack 扩展](https://github.com/rstackjs/rstack-editor)
6666
}
6767
```
6868

69+
### 自定义安装路径 \{#custom-installation-path}
70+
71+
默认情况下,扩展会先在工作区目录的 `node_modules` 中查找 `rstack`,然后向父目录逐级查找。如果 `rstack` 包安装在其他位置,可以通过 `rstack.rstackCli.packagePath` 指定安装路径,例如:
72+
73+
```json title=".vscode/settings.json"
74+
{
75+
"rstack.rstackCli.packagePath": "infra/node_modules/rstack"
76+
}
77+
```
78+
79+
路径可以指向 `rstack` 包目录或其中的 `package.json` 文件。相对路径以工作区目录为基准,也支持绝对路径和 `${workspaceFolder}` 占位符。
80+
6981
## 支持能力 \{#features}
7082

7183
### 代码检查 \{#linting}

0 commit comments

Comments
 (0)