tasks.json 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. {
  2. // See https://go.microsoft.com/fwlink/?LinkId=733558
  3. // for the documentation about the tasks.json format
  4. "version": "2.0.0",
  5. "presentation": {
  6. // Dont show the "Terminal will be reused by tasks, press any key to close it" message
  7. "showReuseMessage": false,
  8. // Dont echo executed command in the terminal
  9. "echo" : false
  10. },
  11. "tasks": [
  12. {
  13. "label": "control shift B",
  14. "type": "shell",
  15. "dependsOn": ["default run executable"],
  16. "group": {"kind": "build","isDefault": true}
  17. },
  18. {
  19. "label": "overwritten",
  20. "type": "shell",
  21. // delete current executable so it can be overwritten with new one
  22. "command": "make clean f=${fileBasenameNoExtension}.exe",
  23. "dependsOn": ["default directory"]
  24. },
  25. {
  26. "label": "default compile",
  27. "type": "shell",
  28. "command": "make ${fileBasenameNoExtension}.exe",
  29. "dependsOn": ["overwritten"]
  30. },
  31. {
  32. "label": "default run executable",
  33. "type": "shell",
  34. "command": "${fileBasenameNoExtension}/./${fileBasenameNoExtension}.exe",
  35. "dependsOn": ["default compile"]
  36. },
  37. {
  38. "label": "default directory",
  39. "windows" : {
  40. "command": "$(test-path ${fileBasenameNoExtension}) -or $(mkdir ${fileBasenameNoExtension}) >$null"
  41. },
  42. "type": "shell",
  43. "presentation" : {
  44. // Dont bring the terminal panel to the front view
  45. "reveal": "never",
  46. // clears terminal as first step, only do this once
  47. "clear" :true
  48. }
  49. }
  50. ]
  51. }