tasks.json 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  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": "go: golangci-lint run",
  120. "type": "shell",
  121. "command": "golangci-lint",
  122. "args": [
  123. "run"
  124. ],
  125. "options": {
  126. "cwd": "${workspaceFolder}"
  127. },
  128. "problemMatcher": [
  129. "$go"
  130. ]
  131. },
  132. {
  133. "label": "go: golangci-lint run --fix",
  134. "type": "shell",
  135. "command": "golangci-lint",
  136. "args": [
  137. "run",
  138. "--fix"
  139. ],
  140. "options": {
  141. "cwd": "${workspaceFolder}"
  142. },
  143. "problemMatcher": [
  144. "$go"
  145. ]
  146. },
  147. {
  148. "label": "frontend: ncu -u",
  149. "type": "shell",
  150. "command": "npx",
  151. "args": [
  152. "npm-check-updates",
  153. "-u"
  154. ],
  155. "options": {
  156. "cwd": "${workspaceFolder}/frontend"
  157. },
  158. "problemMatcher": []
  159. },
  160. {
  161. "label": "frontend: install",
  162. "type": "shell",
  163. "command": "npm",
  164. "args": [
  165. "install"
  166. ],
  167. "options": {
  168. "cwd": "${workspaceFolder}/frontend"
  169. },
  170. "problemMatcher": []
  171. },
  172. {
  173. "label": "frontend: dev",
  174. "type": "shell",
  175. "command": "npm",
  176. "args": [
  177. "run",
  178. "dev"
  179. ],
  180. "options": {
  181. "cwd": "${workspaceFolder}/frontend"
  182. },
  183. "isBackground": true,
  184. "problemMatcher": [],
  185. "presentation": {
  186. "panel": "dedicated",
  187. "group": "dev"
  188. }
  189. },
  190. {
  191. "label": "frontend: build",
  192. "type": "shell",
  193. "command": "npm",
  194. "args": [
  195. "run",
  196. "build"
  197. ],
  198. "options": {
  199. "cwd": "${workspaceFolder}/frontend"
  200. },
  201. "problemMatcher": [
  202. "$tsc"
  203. ],
  204. "group": "build"
  205. },
  206. {
  207. "label": "frontend: gen",
  208. "type": "shell",
  209. "command": "npm",
  210. "args": [
  211. "run",
  212. "gen"
  213. ],
  214. "options": {
  215. "cwd": "${workspaceFolder}/frontend"
  216. },
  217. "problemMatcher": []
  218. },
  219. {
  220. "label": "frontend: lint",
  221. "type": "shell",
  222. "command": "npm",
  223. "args": [
  224. "run",
  225. "lint"
  226. ],
  227. "options": {
  228. "cwd": "${workspaceFolder}/frontend"
  229. },
  230. "problemMatcher": [
  231. "$eslint-stylish"
  232. ]
  233. },
  234. {
  235. "label": "frontend: test",
  236. "type": "shell",
  237. "command": "npm",
  238. "args": [
  239. "run",
  240. "test"
  241. ],
  242. "options": {
  243. "cwd": "${workspaceFolder}/frontend"
  244. },
  245. "problemMatcher": [],
  246. "group": "test"
  247. },
  248. {
  249. "label": "frontend: test:watch",
  250. "type": "shell",
  251. "command": "npm",
  252. "args": [
  253. "run",
  254. "test:watch"
  255. ],
  256. "options": {
  257. "cwd": "${workspaceFolder}/frontend"
  258. },
  259. "isBackground": true,
  260. "problemMatcher": [],
  261. "group": "test",
  262. "presentation": {
  263. "panel": "dedicated",
  264. "group": "test"
  265. }
  266. },
  267. {
  268. "label": "frontend: typecheck",
  269. "type": "shell",
  270. "command": "npm",
  271. "args": [
  272. "run",
  273. "typecheck"
  274. ],
  275. "options": {
  276. "cwd": "${workspaceFolder}/frontend"
  277. },
  278. "problemMatcher": [
  279. "$tsc"
  280. ]
  281. },
  282. {
  283. "label": "frontend: gen:zod",
  284. "type": "shell",
  285. "command": "npm",
  286. "args": [
  287. "run",
  288. "gen:zod"
  289. ],
  290. "options": {
  291. "cwd": "${workspaceFolder}/frontend"
  292. },
  293. "problemMatcher": []
  294. },
  295. {
  296. "label": "frontend: gen:api",
  297. "type": "shell",
  298. "command": "npm",
  299. "args": [
  300. "run",
  301. "gen:api"
  302. ],
  303. "options": {
  304. "cwd": "${workspaceFolder}/frontend"
  305. },
  306. "problemMatcher": []
  307. },
  308. {
  309. "label": "build: full (frontend + go)",
  310. "dependsOrder": "sequence",
  311. "dependsOn": [
  312. "frontend: build",
  313. "go: build"
  314. ],
  315. "problemMatcher": [],
  316. "group": {
  317. "kind": "build",
  318. "isDefault": false
  319. }
  320. },
  321. {
  322. "label": "check: all",
  323. "dependsOn": [
  324. "go: vet",
  325. "go: test",
  326. "frontend: lint",
  327. "frontend: typecheck",
  328. "frontend: test"
  329. ],
  330. "problemMatcher": []
  331. }
  332. ]
  333. }