目标:我有两个子文件夹(jsx用于jsx文件)和(用于ECMA-2017脚本的dash7),我不想合并这些文件夹。我希望设置一个可以监视两个文件夹的VSCODE任务。
问题:现在有两个独立的任务。一个是"jsx手表“,另一个是"es7手表”。我一次只能用VS代码运行一个。
问题:是否有一种方法可以同时完成两种任务,或者有一种方法可以让babel查看两个单独的文件夹。还是另一个解决方案?
{
"version": "0.1.0",
"command": "${workspaceRoot}/node_modules/.bin/babel.cmd",
// "isShellCommand": true,
"tasks": [
{
"args": ["jsx", "--out-dir", "jsxo", "-w", "--source-maps inline"],
"taskName": "jsx watch",
"suppressTaskName": true,
"isBuildCommand": true, // make this the F1 > Task: Run Build Task gesture
"isBackground": true // tell VS Code not wait for this task to finish
},
{
"args": ["dash7", "--out-dir", "dash", "-w", "--source-maps inline"],
"taskName": "es7 watch",
"suppressTaskName": true,
"isBuildCommand": true, // make this the F1 > Task: Run Build Task gesture
"isBackground": true // tell VS Code not wait for this task to finish
}
]
}babel预设
"babel": {
"sourceMaps": "inline",
"presets": [
"react",
"node7"
]发布于 2017-05-08 15:20:11
VSCODE人员刚刚用一个新的终端运行程序更新了VSCODE:
https://github.com/Microsoft/vscode/issues/981
如果将版本更改为2.0.0,则可以一次运行多个任务!
{
"version": "2.0.0",
"command": "${workspaceRoot}/node_modules/.bin/babel.cmd",
// "isShellCommand": true,
"tasks": [
{
"args": ["jsx", "--out-dir", "jsxo", "-w", "--source-maps inline"],
"taskName": "jsx watch",
"suppressTaskName": true,
"isBuildCommand": true, // make this the F1 > Task: Run Build Task gesture
"isBackground": true // tell VS Code not wait for this task to finish
},
{
"args": ["dash7", "--out-dir", "dash", "-w", "--source-maps inline"],
"taskName": "es7 watch",
"suppressTaskName": true,
"isBuildCommand": true, // make this the F1 > Task: Run Build Task gesture
"isBackground": true // tell VS Code not wait for this task to finish
}
]
}https://stackoverflow.com/questions/43809502
复制相似问题