Add VS Code extension assets generated by vbs ide plugin
This commit is contained in:
1 parent
7b589d578c
commit
5d87ec5c93
5 files changed
+99
-1
No files matched your search
@@ -0,0 +1,2 @@
|
|||||||
|
node_modules/**
|
||||||
|
*.vsix
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Void contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -1,3 +1,29 @@
|
|||||||
# VbsVsCode
|
# VbsVsCode
|
||||||
|
|
||||||
VS Code extension assets for VoidBuildSystem, generated by `vbs ide plugin`.
|
VS Code extension for VoidBuildSystem (VBS).
|
||||||
|
|
||||||
|
The assets in this repository are generated by:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
vbs ide plugin --editor vscode --output ./ --force
|
||||||
|
```
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
- `VBS: Build` - `vbs build`
|
||||||
|
- `VBS: Test` - `vbs test`
|
||||||
|
- `VBS: Install` - `vbs install --prefix build/install`
|
||||||
|
- `VBS: Package (installer)` - stages the prefix and writes `build/install/installer.sh`
|
||||||
|
- `VBS: Start Daemon` - `vbs daemon run`
|
||||||
|
- `VBS: Daemon Status` - `vbs daemon status`
|
||||||
|
|
||||||
|
Commands run in a terminal rooted at the VS Code workspace folder (passed as
|
||||||
|
`--project`). Set `VBS_BIN` if `vbs` is not on `PATH`.
|
||||||
|
|
||||||
|
## Packaging
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install -g @vscode/vsce
|
||||||
|
vsce package
|
||||||
|
code --install-extension vbs-tools-0.1.0.vsix
|
||||||
|
```
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
// Generated by `vbs ide plugin`. Requires the `vbs` executable in PATH or VBS_BIN.
|
||||||
|
const vscode = require('vscode');
|
||||||
|
const vbs = process.env.VBS_BIN || "vbs";
|
||||||
|
|
||||||
|
function projectArgs() {
|
||||||
|
const folders = vscode.workspace.workspaceFolders;
|
||||||
|
return folders && folders.length ? ['--project', folders[0].uri.fsPath] : [];
|
||||||
|
}
|
||||||
|
|
||||||
|
function runTerminal(name, args) {
|
||||||
|
const terminal = vscode.window.createTerminal({ name });
|
||||||
|
terminal.show(true);
|
||||||
|
const full = [...args, ...projectArgs()];
|
||||||
|
terminal.sendText([vbs, ...full].map((a) => (a.includes(' ') ? `'${a}'` : a)).join(' '));
|
||||||
|
}
|
||||||
|
|
||||||
|
const commands = [
|
||||||
|
["vbs.build", "VBS: Build", ["build"]],
|
||||||
|
["vbs.test", "VBS: Test", ["test"]],
|
||||||
|
["vbs.install", "VBS: Install", ["install","--prefix","build/install"]],
|
||||||
|
["vbs.package", "VBS: Package (installer)", ["install","--prefix","build/install","--archive","build/install/installer.sh","--archive-format","sh"]],
|
||||||
|
["vbs.daemonStart", "VBS: Start Daemon", ["daemon","run"]],
|
||||||
|
["vbs.daemonStatus", "VBS: Daemon Status", ["daemon","status"]],
|
||||||
|
];
|
||||||
|
|
||||||
|
function activate(context) {
|
||||||
|
for (const [id, title, args] of commands) {
|
||||||
|
context.subscriptions.push(vscode.commands.registerCommand(id, () => runTerminal(title, args)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function deactivate() {}
|
||||||
|
|
||||||
|
module.exports = { activate, deactivate };
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name": "vbs-tools",
|
||||||
|
"displayName": "VoidBuildSystem",
|
||||||
|
"description": "Build, test, install and package with VoidBuildSystem.",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"publisher": "void",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {"vscode": "^1.80.0"},
|
||||||
|
"categories": ["Other"],
|
||||||
|
"activationEvents": [],
|
||||||
|
"main": "./extension.js",
|
||||||
|
"contributes": {
|
||||||
|
"commands": [{"command":"vbs.build","title":"VBS: Build"},{"command":"vbs.test","title":"VBS: Test"},{"command":"vbs.install","title":"VBS: Install"},{"command":"vbs.package","title":"VBS: Package (installer)"},{"command":"vbs.daemonStart","title":"VBS: Start Daemon"},{"command":"vbs.daemonStatus","title":"VBS: Daemon Status"}]
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user