package.json 或requirements.txt 的PowerShell 等效项

问题描述 投票:0回答:1

是否存在列出 PowerShell 项目所需的 powershell 模块的现有约定?相当于Python的requirements.txt或Node的package.json等?运行命令 X 来“安装模块”所有要求?

powershell powershell-core
1个回答
0
投票

PowerShell modules 通过其 module manifest 指定其依赖项。

PowerShell 模块通常是独立的,即与其依赖项捆绑在一起。

但是,内部存储库依赖项(在其他模块上)可以通过

RequiredModules
条目指定,并且当您使用过时的
Install-Module
命令或其后继者
Install-PSResource
时,应该自动安装
- 请参阅此答案了解更多信息。

© www.soinside.com 2019 - 2024. All rights reserved.