My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

extension.js 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. 'use strict';
  2. var vscode = require('vscode');
  3. function activate(context) {
  4. console.log('Extension "AutoBuildMarlin" is now active!');
  5. var NEXT_TERM_ID = 1;
  6. var pio_build = vscode.commands.registerCommand('piobuild', function () {
  7. vscode.commands.executeCommand('workbench.action.files.saveAll');
  8. const terminal = vscode.window.createTerminal(`AB Build #${NEXT_TERM_ID++}`);
  9. terminal.show(true);
  10. terminal.sendText("python buildroot/share/atom/auto_build.py build");
  11. });
  12. var pio_clean = vscode.commands.registerCommand('pioclean', function () {
  13. const terminal = vscode.window.createTerminal(`AB Clean #${NEXT_TERM_ID++}`);
  14. terminal.show(true);
  15. terminal.sendText("python buildroot/share/atom/auto_build.py clean");
  16. });
  17. var pio_upload = vscode.commands.registerCommand('pioupload', function () {
  18. vscode.commands.executeCommand('workbench.action.files.saveAll');
  19. const terminal = vscode.window.createTerminal(`AB Upload #${NEXT_TERM_ID++}`);
  20. terminal.show(true);
  21. terminal.sendText("python buildroot/share/atom/auto_build.py upload");
  22. });
  23. var pio_traceback = vscode.commands.registerCommand('piotraceback', function () {
  24. vscode.commands.executeCommand('workbench.action.files.saveAll');
  25. const terminal = vscode.window.createTerminal(`AB Traceback #${NEXT_TERM_ID++}`);
  26. terminal.show(true);
  27. terminal.sendText("python buildroot/share/atom/auto_build.py traceback");
  28. });
  29. context.subscriptions.push(pio_build);
  30. context.subscriptions.push(pio_clean);
  31. context.subscriptions.push(pio_upload);
  32. context.subscriptions.push(pio_traceback);
  33. }
  34. exports.activate = activate;
  35. // this method is called when your extension is deactivated
  36. function deactivate() {
  37. }
  38. exports.deactivate = deactivate;