From 058320dddbca21133b69c3397fd30420a848305e Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Wed, 27 Jul 2016 08:35:05 +0000 Subject: [PATCH] Add terminal to sdk --- configs/client-default-terminal.js | 45 ++++++++++++++++++++++++++++++ configs/terminal.js | 11 ++++++++ 2 files changed, 56 insertions(+) create mode 100644 configs/client-default-terminal.js create mode 100644 configs/terminal.js diff --git a/configs/client-default-terminal.js b/configs/client-default-terminal.js new file mode 100644 index 00000000..8621f32d --- /dev/null +++ b/configs/client-default-terminal.js @@ -0,0 +1,45 @@ +"use strict"; + +module.exports = function(options) { + var plugins = require("./client-default")(options); + + // TODO: cleanup unneeded plugins? + var includes = []; + var excludes = {}; + + plugins.forEach(function(p) { + if (p.packagePath && p.packagePath.indexOf("c9.core/settings") >= 0) { + p.settings = "defaults"; + p.template = { + user: {}, + project: {}, + state: { + console: { + "@maximized": true, + type: "pane", + nodes: [] + } + } + }; + } + else if (p.packagePath == "plugins/c9.ide.console/console") { + p.defaultState = { + type: "pane", + nodes: [{ + type: "tab", + editorType: "terminal", + active: "true" + }] + }; + } + }); + + plugins = plugins + .concat(includes) + .filter(function (p) { + return !excludes[p] && !excludes[p.packagePath]; + }); + + return plugins; +}; + diff --git a/configs/terminal.js b/configs/terminal.js new file mode 100644 index 00000000..9bc98d15 --- /dev/null +++ b/configs/terminal.js @@ -0,0 +1,11 @@ +module.exports = function(options, optimist) { + var config = require("./standalone")(options, optimist); + + // TODO: cleanup unneeded plugins? + + options.client_config = "default-terminal"; + + return config; +}; + +if (!module.parent) require("../server")([__filename].concat(process.argv.slice(2)));