docs(boot): keep the ancestor chain code block language neutral
The numbered chain lists directories only; the legend for ①-⑤ moves into prose so both language sides can read it while the code block stays byte-identical for the pairing gate.
This commit is contained in:
1 parent
9848ac75f2
commit
058d1d779b
2 files changed
+12
-8
No files matched your search
+6
-4
@@ -25,13 +25,15 @@ Symlinks are followed to their real path per Node's default behavior. Once a mod
|
||||
The chain below defines the numbering that every table in this Note references. The importer is `$DSH_HOME/profiles/web/node_modules/my-plugin/index.js`:
|
||||
|
||||
```text
|
||||
① $DSH_HOME/profiles/web/node_modules/my-plugin/node_modules 插件私有依赖
|
||||
② $DSH_HOME/profiles/web/node_modules profile 安装的包
|
||||
③ $DSH_HOME/profiles/node_modules 拦截层:runtime resolution 占据其中有条目的包目录
|
||||
① $DSH_HOME/profiles/web/node_modules/my-plugin/node_modules
|
||||
② $DSH_HOME/profiles/web/node_modules
|
||||
③ $DSH_HOME/profiles/node_modules
|
||||
④ $DSH_HOME/node_modules
|
||||
⑤ /node_modules,随后是 NODE_PATH 与全局目录
|
||||
⑤ /node_modules
|
||||
```
|
||||
|
||||
① holds the plugin's private dependencies, ② the packages the profile installed, ③ the interception layer where the runtime resolution occupies the package directories it has entries for, ④ the Harness home, and ⑤ the filesystem root followed by `NODE_PATH` and the global directories.
|
||||
|
||||
#### 2. The interception layer: the runtime resolution occupies `$DSH_HOME/profiles/node_modules/<package>`
|
||||
|
||||
The interception layer is the first ancestor `node_modules` above the importer's profile directory (`$DSH_HOME/profiles/<name>`). For every profile inside the tree this layer is `$DSH_HOME/profiles/node_modules`.
|
||||
|
||||
+6
-4
@@ -25,13 +25,15 @@ importer 指发起 `import` 或 `require` 的那个模块文件。Node 从 impor
|
||||
下面这条链是全文表格引用的编号。importer 为 `$DSH_HOME/profiles/web/node_modules/my-plugin/index.js`:
|
||||
|
||||
```text
|
||||
① $DSH_HOME/profiles/web/node_modules/my-plugin/node_modules 插件私有依赖
|
||||
② $DSH_HOME/profiles/web/node_modules profile 安装的包
|
||||
③ $DSH_HOME/profiles/node_modules 拦截层:runtime resolution 占据其中有条目的包目录
|
||||
① $DSH_HOME/profiles/web/node_modules/my-plugin/node_modules
|
||||
② $DSH_HOME/profiles/web/node_modules
|
||||
③ $DSH_HOME/profiles/node_modules
|
||||
④ $DSH_HOME/node_modules
|
||||
⑤ /node_modules,随后是 NODE_PATH 与全局目录
|
||||
⑤ /node_modules
|
||||
```
|
||||
|
||||
① 是插件私有依赖,② 是 profile 安装的包,③ 是拦截层,runtime resolution 占据其中有条目的包目录,④ 是 Harness home,⑤ 是文件系统根,随后是 `NODE_PATH` 与全局目录。
|
||||
|
||||
#### 2. 拦截层:runtime resolution 占据 `$DSH_HOME/profiles/node_modules/<包名>`
|
||||
|
||||
拦截层是 importer 所属 profile 目录(`$DSH_HOME/profiles/<name>`)之上的第一个祖先 `node_modules`。树内所有 profile 的这一层都是 `$DSH_HOME/profiles/node_modules`。
|
||||
|
||||
Reference in new issue
Block a user