Skip to content

Commit 9f5228b

Browse files
committed
add: client build script #76
Edited VS Code build task to use new client build script
1 parent 1a3e983 commit 9f5228b

File tree

2 files changed

+46
-29
lines changed

2 files changed

+46
-29
lines changed

.vscode/tasks.json

+21-29
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,23 @@
11
{
2-
"version": "2.0.0",
3-
"type": "shell",
4-
"windows": {
5-
"options": {
6-
"shell": {
7-
"executable": "C:\\Windows\\System32\\cmd.exe",
8-
"args": [
9-
"/c"
10-
]
11-
}
12-
}
13-
},
14-
"options": {
15-
"cwd": "${workspaceFolder}"
16-
},
17-
"tasks": [
18-
{
19-
"type": "typescript",
20-
"tsconfig": "client/tsconfig.json",
21-
"problemMatcher": [
22-
"$tsc"
23-
],
24-
"group": {
25-
"kind": "build",
26-
"isDefault": true
27-
},
28-
"label": "tsc: 构建 - client/tsconfig.json"
29-
}
30-
]
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "shell",
6+
"command": "./buildClient.sh",
7+
"group": {
8+
"kind": "build",
9+
"isDefault": true
10+
},
11+
"presentation": {
12+
"echo": true,
13+
"reveal": "always",
14+
"focus": false,
15+
"panel": "dedicated",
16+
"showReuseMessage": false,
17+
"clear": true
18+
},
19+
"icon": { "color": "terminal.ansiCyan", "id": "server-process" },
20+
"label": "Build Client"
21+
}
22+
]
3123
}

buildClient.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
bold=$(tput bold)
6+
normal=$(tput sgr0)
7+
8+
black='\e[0;30m'
9+
red='\e[0;31m'
10+
green='\e[0;32m'
11+
cyan='\e[0;36m'
12+
13+
echo -e "${red}${bold}Building VS Code Extension Client..."
14+
15+
echo -e "${cyan}${bold}Compiling TypeScript...${black}${normal}"
16+
cd client
17+
npm i
18+
npm run build
19+
20+
echo -e "${green}${bold}Building Addon Manager WebVue...${black}${normal}"
21+
cd webvue
22+
npm i
23+
npm run build
24+
25+
echo -e "${green}${bold}Build complete!${black}${normal}"

0 commit comments

Comments
 (0)