Con*_*Fan 8 visual-studio-code
Visual Studio Code 在其Run Tasks菜单中显示已配置和自动检测的任务。我想bin从 npm 任务自动检测中排除该文件夹及其所有子文件夹。该npm.exclude设置似乎是为此目的设计的,但我还没有找到如何使用它。
我尝试了以下变体,但没有成功:
"npm.exclude": "**/bin"
"npm.exclude": "**/bin/"
"npm.exclude": "./bin"
"npm.exclude": "./bin/"
"npm.exclude": "**/bin/*.*"
"npm.exclude": "./bin/*.*"
"npm.exclude": ["**/bin"]
"npm.exclude": ["**/bin/"]
"npm.exclude": ["./bin"]
"npm.exclude": ["./bin/"]
"npm.exclude": ["**/bin/*.*"]
"npm.exclude": ["./bin/*.*"]
Run Code Online (Sandbox Code Playgroud)
用于files.exclude和的语法search.exclude似乎不被允许:
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true
}
Run Code Online (Sandbox Code Playgroud)
该npm.exclude设置的适当语法是什么?
小智 6
“ npm.exclude ”需要一个“字符串并使用glob。所以,我对 npm.exclude 的设置,有多个规则:
"npm.exclude": "**/@(vendor|node_modules|bower_components|dist|static)/**"
Run Code Online (Sandbox Code Playgroud)
尝试
"npm.exclude": "**/bin/**"
Run Code Online (Sandbox Code Playgroud)
这对我有用以排除 workspaceFolder/bin/package.json 中的脚本
| 归档时间: |
|
| 查看次数: |
1866 次 |
| 最近记录: |