kopia lustrzana https://github.com/c9/core
Add localdev shortcut
rodzic
0e465a9ae6
commit
11028e4904
12
server.js
12
server.js
|
@ -12,6 +12,7 @@ var optimist = require("optimist");
|
||||||
var async = require("async");
|
var async = require("async");
|
||||||
var os = require("os");
|
var os = require("os");
|
||||||
var urls = require("c9/urls");
|
var urls = require("c9/urls");
|
||||||
|
var child_process = require("child_process");
|
||||||
require("c9/setup_paths.js");
|
require("c9/setup_paths.js");
|
||||||
|
|
||||||
if (process.version.match(/^v0/) && parseFloat(process.version.substr(3)) < 10) {
|
if (process.version.match(/^v0/) && parseFloat(process.version.substr(3)) < 10) {
|
||||||
|
@ -26,8 +27,14 @@ var shortcuts = {
|
||||||
"dev": ["ide", "preview", "user-content", "vfs", "api", "sapi", "proxy", "redis", "profile", "oldclient", "homepage", "apps-proxy", "-s", "devel"],
|
"dev": ["ide", "preview", "user-content", "vfs", "api", "sapi", "proxy", "redis", "profile", "oldclient", "homepage", "apps-proxy", "-s", "devel"],
|
||||||
"onlinedev": ["ide", "preview", "user-content", "vfs", "api", "proxy", "oldclient", "homepage", "apps-proxy", "profile", "worker", "-s", "onlinedev"],
|
"onlinedev": ["ide", "preview", "user-content", "vfs", "api", "proxy", "oldclient", "homepage", "apps-proxy", "profile", "worker", "-s", "onlinedev"],
|
||||||
"beta": ["ide", "preview", "user-content", "vfs", "proxy", "-s", "beta"],
|
"beta": ["ide", "preview", "user-content", "vfs", "proxy", "-s", "beta"],
|
||||||
"s": ["standalone", "-s", "standalone"]
|
"s": ["standalone", "-s", "standalone"],
|
||||||
};
|
};
|
||||||
|
shortcuts.localdev = shortcuts.dev.concat(
|
||||||
|
"-s", "beta",
|
||||||
|
"--ide.packed", "false",
|
||||||
|
"--ide.cdn", "false", "--homepage.cdn", "false",
|
||||||
|
"--force-sudo"
|
||||||
|
);
|
||||||
shortcuts.odev = shortcuts.onlinedev; // For backwards compatibility, if you see this in 2016 remove this line
|
shortcuts.odev = shortcuts.onlinedev; // For backwards compatibility, if you see this in 2016 remove this line
|
||||||
var delayLoadConfigs = [
|
var delayLoadConfigs = [
|
||||||
// Services that are usually not immediately needed
|
// Services that are usually not immediately needed
|
||||||
|
@ -79,7 +86,8 @@ function main(argv, config, onLoaded) {
|
||||||
if (options.argv.exclude && !Array.isArray(options.argv.exclude.length))
|
if (options.argv.exclude && !Array.isArray(options.argv.exclude.length))
|
||||||
options.argv.exclude = [options.argv.exclude];
|
options.argv.exclude = [options.argv.exclude];
|
||||||
|
|
||||||
var expanded = expandShortCuts(configs);
|
var expanded = expandShortCuts(options.argv._);
|
||||||
|
|
||||||
if (expanded.length > configs.length)
|
if (expanded.length > configs.length)
|
||||||
return main(expanded.concat(argv.filter(function(arg) {
|
return main(expanded.concat(argv.filter(function(arg) {
|
||||||
return !shortcuts[arg];
|
return !shortcuts[arg];
|
||||||
|
|
Ładowanie…
Reference in New Issue