【问题标题】:VSCode not auto-detecting grunt fileVSCode 不会自动检测 grunt 文件
【发布时间】:2015-09-11 16:58:11
【问题描述】:
我在 Windows 10 上安装了 VSCode 0.8,打开一个文件夹。该文件夹根目录下的 grunt 文件名为 gruntfile.js(我也尝试过 grunt.js)。 grunt 任务在节点 cli 中工作,但在 VSCode 中未发现。
我试过 ctrl+shift+p,然后“运行任务部署到天蓝色”,其中 grunt 文件中的任务名称是部署到天蓝色。
如何自动检测 grunt 文件?有没有办法在 VSCode 中打开错误报告或我可以查看日志文件以查看发生了什么?或者也许是所有 grunt、gulp、jake 任务的枚举?
【问题讨论】:
标签:
azure
gruntjs
visual-studio-code
【解决方案1】:
同意我在 .vscode/tasks.json 中执行此操作,这对我来说一切正常。我确实必须重新启动,因为我在升级过程中不知何故失去了咕噜声。
// A task runner configuration.
{
"version": "0.1.0",
"command": "grunt",
"isShellCommand": true,
"tasks": [
{
"taskName": "build",
// Make this the default build command.
"isBuildCommand": true,
// Show the output window only if unrecognized errors occur.
"showOutput": "silent"
// Use the standard less compilation problem matcher.
/* "problemMatcher": "$lessCompile" */
},
{
"taskName": "test",
// Make this the default build command.
"isBuildCommand": false,
// Show the output window only if unrecognized errors occur.
"showOutput": "always"
// Use the standard less compilation problem matcher.
/* "problemMatcher": "$lessCompile" */
},
{
"taskName": "localhost",
// Make this the default build command.
"isBuildCommand": false,
// Show the output window only if unrecognized errors occur.
"showOutput": "always"
// Use the standard less compilation problem matcher.
/* "problemMatcher": "$lessCompile" */
}
]
}