今はVisual Studioコードでtasks.json 0.1.0バージョンのタスクを使用しています。tasks.jsonバージョン2でgulpビルドを設定するにはどうすればよいですか?
https://code.visualstudio.com/docs/editor/tasksに移動すると、VSコードが自動的にgulpファイル内のすべてのタスクを検出することを示します。
タスクを自動検出するためにさまざまな拡張機能をインストールしましたが、まだ検出されていません。
ここでは、すべてのGulpタスクを処理する新しいバージョンのtasks.jsonを作成します。
どうすればよいですか?
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "gulp",
"isShellCommand": true,
"args": [],
"showOutput": "always",
"options": {
"cwd": "${workspaceRoot}/MyAppName"
},
"tasks": [
{
"taskName": "build",
"args": ["build:debug"]
},
{
"taskName": "build:debug",
"args": ["build:debug"]
},
{
"taskName": "build:release",
"args": ["build:release"]
}
]
}
私は他の質問を見てきたし、tasks.json 2.0で実行してゴクゴクを取得する方法を示し、現時点では何があるようには思えない。ここに私のtasks.json 0.1.0です。
gulpfileを含むフォルダの外からこのビルドタスクを使用できます。私はVSが自動的に私のgulpfileが開かれているフォルダのタスクを検出することを知っている。