mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-09 14:16:07 +00:00
5c5a509605
Add VS Code tasks to run golangci-lint (with and without --fix) and mark *.go as text eol=lf so Go sources check out with LF, avoiding spurious CRLF lint failures on Windows. Also drop the now-redundant explicit DockerInit.sh/DockerEntrypoint.sh entries already covered by *.sh.
333 lines
6.1 KiB
JSON
333 lines
6.1 KiB
JSON
{
|
|
"version": "2.0.0",
|
|
"tasks": [
|
|
{
|
|
"label": "go: build",
|
|
"type": "shell",
|
|
"command": "go",
|
|
"args": [
|
|
"build",
|
|
"-o",
|
|
"bin/3x-ui.exe",
|
|
"./main.go"
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}"
|
|
},
|
|
"problemMatcher": [
|
|
"$go"
|
|
],
|
|
"group": {
|
|
"kind": "build",
|
|
"isDefault": true
|
|
}
|
|
},
|
|
{
|
|
"label": "go: run",
|
|
"type": "shell",
|
|
"command": "go",
|
|
"args": [
|
|
"run",
|
|
"./main.go"
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}",
|
|
"env": {
|
|
"XUI_DEBUG": "true"
|
|
}
|
|
},
|
|
"problemMatcher": [
|
|
"$go"
|
|
]
|
|
},
|
|
{
|
|
"label": "go: test",
|
|
"type": "shell",
|
|
"command": "go",
|
|
"args": [
|
|
"test",
|
|
"./..."
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}"
|
|
},
|
|
"problemMatcher": [
|
|
"$go"
|
|
],
|
|
"group": "test"
|
|
},
|
|
{
|
|
"label": "go: vet",
|
|
"type": "shell",
|
|
"command": "go",
|
|
"args": [
|
|
"vet",
|
|
"./..."
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}"
|
|
},
|
|
"problemMatcher": [
|
|
"$go"
|
|
]
|
|
},
|
|
{
|
|
"label": "go: fmt",
|
|
"type": "shell",
|
|
"command": "go",
|
|
"args": [
|
|
"fmt",
|
|
"./..."
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}"
|
|
},
|
|
"problemMatcher": [
|
|
"$go"
|
|
]
|
|
},
|
|
{
|
|
"label": "go: modernize",
|
|
"type": "shell",
|
|
"command": "modernize",
|
|
"args": [
|
|
"./..."
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}"
|
|
},
|
|
"problemMatcher": [
|
|
"$go"
|
|
]
|
|
},
|
|
{
|
|
"label": "go: modernize -fix",
|
|
"type": "shell",
|
|
"command": "modernize",
|
|
"args": [
|
|
"-fix",
|
|
"./..."
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}"
|
|
},
|
|
"problemMatcher": [
|
|
"$go"
|
|
]
|
|
},
|
|
{
|
|
"label": "go: golangci-lint run",
|
|
"type": "shell",
|
|
"command": "golangci-lint",
|
|
"args": [
|
|
"run"
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}"
|
|
},
|
|
"problemMatcher": [
|
|
"$go"
|
|
]
|
|
},
|
|
{
|
|
"label": "go: golangci-lint run --fix",
|
|
"type": "shell",
|
|
"command": "golangci-lint",
|
|
"args": [
|
|
"run",
|
|
"--fix"
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}"
|
|
},
|
|
"problemMatcher": [
|
|
"$go"
|
|
]
|
|
},
|
|
{
|
|
"label": "frontend: ncu -u",
|
|
"type": "shell",
|
|
"command": "npx",
|
|
"args": [
|
|
"npm-check-updates",
|
|
"-u"
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/frontend"
|
|
},
|
|
"problemMatcher": []
|
|
},
|
|
{
|
|
"label": "frontend: install",
|
|
"type": "shell",
|
|
"command": "npm",
|
|
"args": [
|
|
"install"
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/frontend"
|
|
},
|
|
"problemMatcher": []
|
|
},
|
|
{
|
|
"label": "frontend: dev",
|
|
"type": "shell",
|
|
"command": "npm",
|
|
"args": [
|
|
"run",
|
|
"dev"
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/frontend"
|
|
},
|
|
"isBackground": true,
|
|
"problemMatcher": [],
|
|
"presentation": {
|
|
"panel": "dedicated",
|
|
"group": "dev"
|
|
}
|
|
},
|
|
{
|
|
"label": "frontend: build",
|
|
"type": "shell",
|
|
"command": "npm",
|
|
"args": [
|
|
"run",
|
|
"build"
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/frontend"
|
|
},
|
|
"problemMatcher": [
|
|
"$tsc"
|
|
],
|
|
"group": "build"
|
|
},
|
|
{
|
|
"label": "frontend: gen",
|
|
"type": "shell",
|
|
"command": "npm",
|
|
"args": [
|
|
"run",
|
|
"gen"
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/frontend"
|
|
},
|
|
"problemMatcher": []
|
|
},
|
|
{
|
|
"label": "frontend: lint",
|
|
"type": "shell",
|
|
"command": "npm",
|
|
"args": [
|
|
"run",
|
|
"lint"
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/frontend"
|
|
},
|
|
"problemMatcher": [
|
|
"$eslint-stylish"
|
|
]
|
|
},
|
|
{
|
|
"label": "frontend: test",
|
|
"type": "shell",
|
|
"command": "npm",
|
|
"args": [
|
|
"run",
|
|
"test"
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/frontend"
|
|
},
|
|
"problemMatcher": [],
|
|
"group": "test"
|
|
},
|
|
{
|
|
"label": "frontend: test:watch",
|
|
"type": "shell",
|
|
"command": "npm",
|
|
"args": [
|
|
"run",
|
|
"test:watch"
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/frontend"
|
|
},
|
|
"isBackground": true,
|
|
"problemMatcher": [],
|
|
"group": "test",
|
|
"presentation": {
|
|
"panel": "dedicated",
|
|
"group": "test"
|
|
}
|
|
},
|
|
{
|
|
"label": "frontend: typecheck",
|
|
"type": "shell",
|
|
"command": "npm",
|
|
"args": [
|
|
"run",
|
|
"typecheck"
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/frontend"
|
|
},
|
|
"problemMatcher": [
|
|
"$tsc"
|
|
]
|
|
},
|
|
{
|
|
"label": "frontend: gen:zod",
|
|
"type": "shell",
|
|
"command": "npm",
|
|
"args": [
|
|
"run",
|
|
"gen:zod"
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/frontend"
|
|
},
|
|
"problemMatcher": []
|
|
},
|
|
{
|
|
"label": "frontend: gen:api",
|
|
"type": "shell",
|
|
"command": "npm",
|
|
"args": [
|
|
"run",
|
|
"gen:api"
|
|
],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/frontend"
|
|
},
|
|
"problemMatcher": []
|
|
},
|
|
{
|
|
"label": "build: full (frontend + go)",
|
|
"dependsOrder": "sequence",
|
|
"dependsOn": [
|
|
"frontend: build",
|
|
"go: build"
|
|
],
|
|
"problemMatcher": [],
|
|
"group": {
|
|
"kind": "build",
|
|
"isDefault": false
|
|
}
|
|
},
|
|
{
|
|
"label": "check: all",
|
|
"dependsOn": [
|
|
"go: vet",
|
|
"go: test",
|
|
"frontend: lint",
|
|
"frontend: typecheck",
|
|
"frontend: test"
|
|
],
|
|
"problemMatcher": []
|
|
}
|
|
]
|
|
} |