You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.8 KiB
JavaScript

'use strict';
var vscode = require('vscode');
function activate(context) {
console.log('Extension "AutoBuildMarlin" is now active!');
var NEXT_TERM_ID = 1;
5 years ago
var mf_build = vscode.commands.registerCommand('mfbuild', function () {
vscode.commands.executeCommand('workbench.action.files.saveAll');
5 years ago
const terminal = vscode.window.createTerminal(`Marlin Build #${NEXT_TERM_ID++}`);
terminal.show(true);
terminal.sendText("python buildroot/share/atom/auto_build.py build");
});
5 years ago
var mf_upload = vscode.commands.registerCommand('mfupload', function () {
vscode.commands.executeCommand('workbench.action.files.saveAll');
5 years ago
const terminal = vscode.window.createTerminal(`Marlin Upload #${NEXT_TERM_ID++}`);
terminal.show(true);
terminal.sendText("python buildroot/share/atom/auto_build.py upload");
});
5 years ago
var mf_traceback = vscode.commands.registerCommand('mftraceback', function () {
vscode.commands.executeCommand('workbench.action.files.saveAll');
5 years ago
const terminal = vscode.window.createTerminal(`Marlin Traceback #${NEXT_TERM_ID++}`);
terminal.show(true);
terminal.sendText("python buildroot/share/atom/auto_build.py traceback");
});
5 years ago
var mf_clean = vscode.commands.registerCommand('mfclean', function () {
const terminal = vscode.window.createTerminal(`Marlin Clean #${NEXT_TERM_ID++}`);
terminal.show(true);
terminal.sendText("python buildroot/share/atom/auto_build.py clean");
});
5 years ago
context.subscriptions.push(mf_build);
context.subscriptions.push(mf_upload);
context.subscriptions.push(mf_traceback);
context.subscriptions.push(mf_clean);
}
exports.activate = activate;
// this method is called when your extension is deactivated
function deactivate() {
}
exports.deactivate = deactivate;