[英]Visual Studio Code, how to set a config to show scripts only from the root package.json
I have multiple package.json files in my project in different folders.我的项目中有多个 package.json 文件位于不同的文件夹中。 VSCode reads scripts from all the files and shows them up in the "NPM SCRIPTS" panel.
VSCode 从所有文件中读取脚本并将它们显示在“NPM SCRIPTS”面板中。 I want to show scripts only from the root package.json file.
我只想显示来自根 package.json 文件的脚本。 How to add config to the project to read only the root package.json or maybe set a precise path to it.
如何将配置添加到项目以仅读取根 package.json 或设置精确路径。 Is it possible?
可能吗? Thanks for any help
谢谢你的帮助
Not exactly sure why this glob works, but this setting (in settings.json
) seems to work:不完全确定为什么这个 glob 有效,但这个设置(在
settings.json
)似乎有效:
"npm.exclude": "**/folder-operations/**"
where folder-operations
would be your root folder.其中
folder-operations
将是您的根文件夹。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.