diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 1653e33e84d296667a3c1540971f2d1f7a74cb8c..547df146ff721051be4e4abaf388b63b9c25775e 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,31 +1,23 @@ { - "version": "2.0.0", - "type": "shell", - "windows": { - "options": { - "shell": { - "executable": "C:\\Windows\\System32\\cmd.exe", - "args": [ - "/c" - ] - } - } - }, - "options": { - "cwd": "${workspaceFolder}" - }, - "tasks": [ - { - "type": "typescript", - "tsconfig": "client/tsconfig.json", - "problemMatcher": [ - "$tsc" - ], - "group": { - "kind": "build", - "isDefault": true - }, - "label": "tsc: 构建 - client/tsconfig.json" - } - ] + "version": "2.0.0", + "tasks": [ + { + "type": "shell", + "command": "./buildClient.sh", + "group": { + "kind": "build", + "isDefault": true + }, + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "dedicated", + "showReuseMessage": false, + "clear": true + }, + "icon": { "color": "terminal.ansiCyan", "id": "server-process" }, + "label": "Build Client" + } + ] } diff --git a/buildClient.sh b/buildClient.sh new file mode 100644 index 0000000000000000000000000000000000000000..694f0fe16aced47eb10dc4123f6f2caa6785d255 --- /dev/null +++ b/buildClient.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -e + +bold=$(tput bold) +normal=$(tput sgr0) + +black='\e[0;30m' +red='\e[0;31m' +green='\e[0;32m' +cyan='\e[0;36m' + +echo -e "${red}${bold}Building VS Code Extension Client..." + +echo -e "${cyan}${bold}Compiling TypeScript...${black}${normal}" +cd client +npm i +npm run build + +echo -e "${green}${bold}Building Addon Manager WebVue...${black}${normal}" +cd webvue +npm i +npm run build + +echo -e "${green}${bold}Build complete!${black}${normal}"