2017-05-05 13 views
3

Ziel: Ich habe zwei Unterordner (Jsx für Jsx-Dateien) und (Dash7 für ECMA-2017-Skripts) Ich möchte diese Ordner nicht kombinieren. Ich möchte ein VSKODE-Aufgaben einrichten, die beide Ordner überwachen können.bekommen babel zwei Ordner zu sehen

Ausgabe: Jetzt habe ich zwei getrennte Aufgaben. Ein „jsx beobachten“ die andere „ES7 Uhr) ich nur einen nach dem anderen mit VS-Code ausführen kann

Frage:.. ist es eine Möglichkeit, um eine Aufgabe zu schreiben, die beide tun, oder ist es eine Möglichkeit, erhalten babel zwei separate Ordner zu sehen oder eine andere Lösung

{ 
    "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" 
    ] 

Antwort

2

Die VSCODE Leute nur mit einem neuen Terminal runner visuellen Code aktualisiert:.?

https://github.com/Microsoft/vscode/issues/981

Wenn Sie die Version 2.0.0 dann können Sie mehrere Aufgaben gleichzeitig ausführen zu ändern!

{ 
    "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 
     } 
    ] 
} 
Verwandte Themen