2015-09-11 42 views
0

我在Windows 10上安裝了VSCode 0.8,打開文件夾。該文件夾根目錄下的grunt文件名爲gruntfile.js(我也試過grunt.js)。 grunt任務從節點cli工作,但不在VSCode內部發現。VSCode不自動檢測垃圾文件

我嘗試了ctrl + shift + p,然後'運行任務部署到天藍色',其中grunt文件中的任務名稱部署到天藍色。

grunt文件是如何自動檢測的?有沒有辦法打開VSCode中的錯誤報告或日誌文件我可以查看發生了什麼?或者也許是所有的咕嚕,吞嚥,傑克任務的枚舉?

回答

0

同意我在.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" */ 
     } 
    ] 
}