build: improved buildscript and bundle, added cmds

This commit is contained in:
əlemi 2023-07-04 01:02:50 +02:00
parent 4563cfdd09
commit 7d497c224d
3 changed files with 16 additions and 7 deletions

3
.gitignore vendored
View file

@ -5,6 +5,5 @@ Cargo.lock
# vscode extension build files
/client/vscode/node_modules/
/client/vscode/*.vsix
/client/vscode/index.node
/client/vscode/index.node
/client/vscode/codemp.node

View file

@ -6,7 +6,7 @@ cp package.json .vsix/extension/package.json
cp README.md .vsix/extension/README.md
mkdir .vsix/extension/out
cp -R src/*.js .vsix/extension/out
cp -R index.node .vsix/extension/out/codemp.node
cp -R codemp.node .vsix/extension/out/codemp.node
cd .vsix/
zip ../codemp.vsix -r *
cd ..

View file

@ -1,5 +1,5 @@
{
"name": "codemp",
"name": "codemp-vscode",
"version": "0.0.1",
"description": "VSCode extension for CodeMP",
"main": "./out/extension.js",
@ -7,7 +7,7 @@
"vscode": "^1.32.0"
},
"scripts": {
"build": "cargo-cp-artifact -nc index.node -- cargo build --message-format=json-render-diagnostics",
"build": "cargo-cp-artifact --artifact cdylib codemp-vscode codemp.node -- cargo build --release --message-format=json-render-diagnostics",
"install": "npm run build",
"test": "cargo test"
},
@ -18,11 +18,21 @@
"commands": [
{
"command": "codemp.connect",
"title": "Connect"
"title": "Connect to CodeMP"
},
{
"command": "codemp.join",
"title": "Join remote session"
},
{
"command": "codemp.share",
"title": "Share local session"
}
]
},
"activationEvents": [
"onCommand:codemp.connect"
"onCommand:codemp.connect",
"onCommand:codemp.join",
"onCommand:codemp.share"
]
}