2017-09-05 2 views
0

VSCodeのタスクからタスクを実行することはできますか?VScodeのタスク

例のJSON:

{ 
// See https://go.microsoft.com/fwlink/?LinkId=733558 
// for the documentation about the tasks.json format 
"version": "2.0.0", 
"tasks": [ 
    { 
     "taskName": "Show In Chrome", 
     "windows": { 
      "command": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" 
     }, 
     "osx": { 
      "command": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" 
     }, 
     "args": [ 
      "${file}" 
     ], 
     "type": "process", 
    }, 
    { 
     "taskName": "Show Coverage", 
     // this is the task to call another task 
    } 
] 

は}

私は何をしたいのカバレッジフォルダ内のファイルを表示カバレッジタスクを見て、次にとしてそれを示すために、クロームタスクでショーを呼んでそのファイルの引数が渡されます。これは可能ですか?

+0

このコメントは分かりません。 – KeniSteward

答えて

0

ドキュメントのウェブサイトの現在の設定がタスク用に更新されていないことが判明しました。それが彼らに依存しているため

しかしあなたは、タスクが他のタスクを呼び出したい場合は、単にこれは、前のタスクを実行するタスクを引き起こし、それが設定したコマンドを何でも実行されます

{ 
// See https://go.microsoft.com/fwlink/?LinkId=733558 
// for the documentation about the tasks.json format 
"version": "2.0.0", 
"tasks": [ 
    { 
     "taskName": "Show In Chrome", 
     "identifier": "showInChrome", 
     "windows": { 
      "command": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" 
     }, 
     "osx": { 
      "command": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" 
     }, 
     "args": [ 
      "${file}" 
     ], 
     "type": "process", 
    }, 
    { 
     "taskName": "Show Coverage", 
     "dependsOn": "showInChrome" 
    } 
] 
} 

この設定を追加することができます同じように。

注:複数の識別子を使用するには、識別子の配列を使用します。

関連する問題