Node.js/yarn:修订间差异
来自康健生活
| 第189行: | 第189行: | ||
{{shc|<syntaxhighlight lang="bash"> | {{shc|<syntaxhighlight lang="bash"> | ||
yarn workspace <workspaceName> <commandName></syntaxhighlight>|$|/home/kangkk}} | yarn workspace <workspaceName> <commandName></syntaxhighlight>|$|/home/kangkk}} | ||
=== 子项目 === | |||
{{hc|head=package.json|output=<syntaxhighlight lang="bash"> | |||
... | |||
"packageManager": "yarn@4.4.1", | |||
"workspaces": [ | |||
"athena-frontend", | |||
"src/next/codemirror/language/test/lezer-test" | |||
] | |||
} | |||
</syntaxhighlight>}} | |||
workspaces 中可以是子项目 package.json 的名称或者是相对路径,依据经验而言,对于复杂项目(子项目位置不统一)的场景,相对路径是更好的选择。 | |||