tasks.json 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. {
  2. "version": "2.0.0",
  3. "tasks": [
  4. {
  5. "label": "go: build",
  6. "type": "shell",
  7. "command": "go",
  8. "args": [
  9. "build",
  10. "-o",
  11. "bin/3x-ui.exe",
  12. "./main.go"
  13. ],
  14. "options": {
  15. "cwd": "${workspaceFolder}"
  16. },
  17. "problemMatcher": [
  18. "$go"
  19. ],
  20. "group": {
  21. "kind": "build",
  22. "isDefault": true
  23. }
  24. },
  25. {
  26. "label": "go: run",
  27. "type": "shell",
  28. "command": "go",
  29. "args": [
  30. "run",
  31. "./main.go"
  32. ],
  33. "options": {
  34. "cwd": "${workspaceFolder}",
  35. "env": {
  36. "XUI_DEBUG": "true"
  37. }
  38. },
  39. "problemMatcher": [
  40. "$go"
  41. ]
  42. },
  43. {
  44. "label": "go: test",
  45. "type": "shell",
  46. "command": "go",
  47. "args": [
  48. "test",
  49. "./..."
  50. ],
  51. "options": {
  52. "cwd": "${workspaceFolder}"
  53. },
  54. "problemMatcher": [
  55. "$go"
  56. ],
  57. "group": "test"
  58. },
  59. {
  60. "label": "go: vet",
  61. "type": "shell",
  62. "command": "go",
  63. "args": [
  64. "vet",
  65. "./..."
  66. ],
  67. "options": {
  68. "cwd": "${workspaceFolder}"
  69. },
  70. "problemMatcher": [
  71. "$go"
  72. ]
  73. },
  74. {
  75. "label": "go: fmt",
  76. "type": "shell",
  77. "command": "go",
  78. "args": [
  79. "fmt",
  80. "./..."
  81. ],
  82. "options": {
  83. "cwd": "${workspaceFolder}"
  84. },
  85. "problemMatcher": [
  86. "$go"
  87. ]
  88. },
  89. {
  90. "label": "go: modernize",
  91. "type": "shell",
  92. "command": "modernize",
  93. "args": [
  94. "./..."
  95. ],
  96. "options": {
  97. "cwd": "${workspaceFolder}"
  98. },
  99. "problemMatcher": [
  100. "$go"
  101. ]
  102. },
  103. {
  104. "label": "go: modernize -fix",
  105. "type": "shell",
  106. "command": "modernize",
  107. "args": [
  108. "-fix",
  109. "./..."
  110. ],
  111. "options": {
  112. "cwd": "${workspaceFolder}"
  113. },
  114. "problemMatcher": [
  115. "$go"
  116. ]
  117. },
  118. {
  119. "label": "frontend: ncu -u",
  120. "type": "shell",
  121. "command": "npx",
  122. "args": [
  123. "npm-check-updates",
  124. "-u"
  125. ],
  126. "options": {
  127. "cwd": "${workspaceFolder}/frontend"
  128. },
  129. "problemMatcher": []
  130. },
  131. {
  132. "label": "frontend: install",
  133. "type": "shell",
  134. "command": "npm",
  135. "args": [
  136. "install"
  137. ],
  138. "options": {
  139. "cwd": "${workspaceFolder}/frontend"
  140. },
  141. "problemMatcher": []
  142. },
  143. {
  144. "label": "frontend: dev",
  145. "type": "shell",
  146. "command": "npm",
  147. "args": [
  148. "run",
  149. "dev"
  150. ],
  151. "options": {
  152. "cwd": "${workspaceFolder}/frontend"
  153. },
  154. "isBackground": true,
  155. "problemMatcher": [],
  156. "presentation": {
  157. "panel": "dedicated",
  158. "group": "dev"
  159. }
  160. },
  161. {
  162. "label": "frontend: build",
  163. "type": "shell",
  164. "command": "npm",
  165. "args": [
  166. "run",
  167. "build"
  168. ],
  169. "options": {
  170. "cwd": "${workspaceFolder}/frontend"
  171. },
  172. "problemMatcher": [
  173. "$tsc"
  174. ],
  175. "group": "build"
  176. },
  177. {
  178. "label": "frontend: gen",
  179. "type": "shell",
  180. "command": "npm",
  181. "args": [
  182. "run",
  183. "gen"
  184. ],
  185. "options": {
  186. "cwd": "${workspaceFolder}/frontend"
  187. },
  188. "problemMatcher": []
  189. },
  190. {
  191. "label": "frontend: lint",
  192. "type": "shell",
  193. "command": "npm",
  194. "args": [
  195. "run",
  196. "lint"
  197. ],
  198. "options": {
  199. "cwd": "${workspaceFolder}/frontend"
  200. },
  201. "problemMatcher": [
  202. "$eslint-stylish"
  203. ]
  204. },
  205. {
  206. "label": "frontend: test",
  207. "type": "shell",
  208. "command": "npm",
  209. "args": [
  210. "run",
  211. "test"
  212. ],
  213. "options": {
  214. "cwd": "${workspaceFolder}/frontend"
  215. },
  216. "problemMatcher": [],
  217. "group": "test"
  218. },
  219. {
  220. "label": "frontend: test:watch",
  221. "type": "shell",
  222. "command": "npm",
  223. "args": [
  224. "run",
  225. "test:watch"
  226. ],
  227. "options": {
  228. "cwd": "${workspaceFolder}/frontend"
  229. },
  230. "isBackground": true,
  231. "problemMatcher": [],
  232. "group": "test",
  233. "presentation": {
  234. "panel": "dedicated",
  235. "group": "test"
  236. }
  237. },
  238. {
  239. "label": "frontend: typecheck",
  240. "type": "shell",
  241. "command": "npm",
  242. "args": [
  243. "run",
  244. "typecheck"
  245. ],
  246. "options": {
  247. "cwd": "${workspaceFolder}/frontend"
  248. },
  249. "problemMatcher": [
  250. "$tsc"
  251. ]
  252. },
  253. {
  254. "label": "frontend: gen:zod",
  255. "type": "shell",
  256. "command": "npm",
  257. "args": [
  258. "run",
  259. "gen:zod"
  260. ],
  261. "options": {
  262. "cwd": "${workspaceFolder}/frontend"
  263. },
  264. "problemMatcher": []
  265. },
  266. {
  267. "label": "frontend: gen:api",
  268. "type": "shell",
  269. "command": "npm",
  270. "args": [
  271. "run",
  272. "gen:api"
  273. ],
  274. "options": {
  275. "cwd": "${workspaceFolder}/frontend"
  276. },
  277. "problemMatcher": []
  278. },
  279. {
  280. "label": "build: full (frontend + go)",
  281. "dependsOrder": "sequence",
  282. "dependsOn": [
  283. "frontend: build",
  284. "go: build"
  285. ],
  286. "problemMatcher": [],
  287. "group": {
  288. "kind": "build",
  289. "isDefault": false
  290. }
  291. },
  292. {
  293. "label": "check: all",
  294. "dependsOn": [
  295. "go: vet",
  296. "go: test",
  297. "frontend: lint",
  298. "frontend: typecheck",
  299. "frontend: test"
  300. ],
  301. "problemMatcher": []
  302. }
  303. ]
  304. }