目标:我有两个子文件夹(jsx用于jsx文件)和(dash7用于ECMA-2017脚本)我不想合并这些文件夹。我想设置一个可以同时监视两个文件夹的VSCODE任务。
问题:现在,我有两个单独的任务。一个“jsx手表”另一个“es7手表”。我只能用VS Code一次运行一个。
问题:有没有办法编写同时执行这两项工作的任务,或者是否有办法让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 presets
"babel": {
"sourceMaps": "inline",
"presets": [
"react",
"node7"
]