mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
Merge pull request +14609 from c9/none-terminal
Add terminal configs to sdk
This commit is contained in:
commit
2ac2a08f2f
45
configs/client-default-terminal.js
Normal file
45
configs/client-default-terminal.js
Normal file
@ -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;
|
||||
};
|
||||
|
||||
11
configs/terminal.js
Normal file
11
configs/terminal.js
Normal file
@ -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)));
|
||||
Loading…
x
Reference in New Issue
Block a user