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 # vscode extension build files
/client/vscode/node_modules/ /client/vscode/node_modules/
/client/vscode/*.vsix /client/vscode/*.vsix
/client/vscode/index.node /client/vscode/codemp.node
/client/vscode/index.node

View file

@ -6,7 +6,7 @@ cp package.json .vsix/extension/package.json
cp README.md .vsix/extension/README.md cp README.md .vsix/extension/README.md
mkdir .vsix/extension/out mkdir .vsix/extension/out
cp -R src/*.js .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/ cd .vsix/
zip ../codemp.vsix -r * zip ../codemp.vsix -r *
cd .. cd ..

View file

@ -1,5 +1,5 @@
{ {
"name": "codemp", "name": "codemp-vscode",
"version": "0.0.1", "version": "0.0.1",
"description": "VSCode extension for CodeMP", "description": "VSCode extension for CodeMP",
"main": "./out/extension.js", "main": "./out/extension.js",
@ -7,7 +7,7 @@
"vscode": "^1.32.0" "vscode": "^1.32.0"
}, },
"scripts": { "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", "install": "npm run build",
"test": "cargo test" "test": "cargo test"
}, },
@ -18,11 +18,21 @@
"commands": [ "commands": [
{ {
"command": "codemp.connect", "command": "codemp.connect",
"title": "Connect" "title": "Connect to CodeMP"
},
{
"command": "codemp.join",
"title": "Join remote session"
},
{
"command": "codemp.share",
"title": "Share local session"
} }
] ]
}, },
"activationEvents": [ "activationEvents": [
"onCommand:codemp.connect" "onCommand:codemp.connect",
"onCommand:codemp.join",
"onCommand:codemp.share"
] ]
} }