kopia lustrzana https://github.com/c9/core
Merge remote-tracking branch 'origin/master' into newclient-dockerlike-deploy
rodzic
c8ed575dfd
commit
aa0001632a
|
@ -47,6 +47,7 @@ node_modules/kaefer/node_modules/
|
|||
!node_modules/logicblox
|
||||
!node_modules/connect-architect
|
||||
!node_modules/pty.js
|
||||
node_modules/pty.js/.npmignore
|
||||
!node_modules/ui
|
||||
!node_modules/react-bootstrap
|
||||
!node_modules/oldclient
|
||||
|
|
|
@ -1223,8 +1223,11 @@ define(function(require, exports, module) {
|
|||
tabs.getTabs().forEach(function(tab) {
|
||||
if (tab.editorType == "ace") {
|
||||
var c9Session = tab.document.getSession();
|
||||
if (c9Session && c9Session.session)
|
||||
detectSyntax(c9Session, tab.path);
|
||||
if (c9Session && c9Session.session) {
|
||||
var syntax = getSyntax(c9Session, tab.path);
|
||||
if (syntax)
|
||||
c9Session.setOption("syntax", syntax);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 50);
|
||||
|
@ -1239,6 +1242,7 @@ define(function(require, exports, module) {
|
|||
modes.byCaption[opts.caption] = opts;
|
||||
modes.byName[name] = opts;
|
||||
|
||||
opts.order = opts.order || 0;
|
||||
if (!opts.extensions)
|
||||
opts.extensions = "";
|
||||
|
||||
|
|
|
@ -116,18 +116,19 @@ define(function(require, exports, module) {
|
|||
}
|
||||
|
||||
var config = [];
|
||||
var count = list.length;
|
||||
var loadConfig = function(){
|
||||
architect.loadAdditionalPlugins(config, function(err){
|
||||
if (err) console.error(err);
|
||||
});
|
||||
};
|
||||
|
||||
function next(name){
|
||||
if (!name) {
|
||||
if (--count === 0) finish();
|
||||
return;
|
||||
}
|
||||
|
||||
async.each(list, function(name, next){
|
||||
var resourceHolder = new Plugin();
|
||||
var resourceVersion = "";
|
||||
|
||||
resourceHolder.on("load", function(){ load(); });
|
||||
resourceHolder.on("load", function(){
|
||||
if (inited) load();
|
||||
});
|
||||
|
||||
resourceHolder.freezePublicAPI({
|
||||
get version(){ return resourceVersion },
|
||||
|
@ -156,9 +157,11 @@ define(function(require, exports, module) {
|
|||
var base = join(String(c9.projectId),
|
||||
"plugins", auth.accessToken);
|
||||
|
||||
// Configure Require.js
|
||||
var pathConfig = {};
|
||||
|
||||
pathConfig["plugins/" + name] = host + join(base, name);
|
||||
requirejs.config({ paths: pathConfig });
|
||||
|
||||
// Add the plugin to the config
|
||||
Object.keys(options.plugins).forEach(function(path){
|
||||
var pluginPath = name + "/" + path;
|
||||
|
@ -173,8 +176,7 @@ define(function(require, exports, module) {
|
|||
config.push(cfg);
|
||||
});
|
||||
|
||||
requirejs.config({paths: pathConfig});
|
||||
|
||||
// Set version for package manager
|
||||
resourceHolder.version = options.version;
|
||||
|
||||
// Start the installer if one is included
|
||||
|
@ -226,28 +228,27 @@ define(function(require, exports, module) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
load();
|
||||
}
|
||||
|
||||
function finish(){
|
||||
}, function(){
|
||||
if (!config.length) return;
|
||||
|
||||
// Load config
|
||||
if (installer.sessions.length) {
|
||||
installer.on("stop", function(err){
|
||||
installer.on("stop", function listen(err){
|
||||
if (err)
|
||||
return console.error(err);
|
||||
finish();
|
||||
|
||||
if (!installer.sessions.length) {
|
||||
loadConfig();
|
||||
installer.off("stop", listen);
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
architect.loadAdditionalPlugins(config, function(err){
|
||||
if (err) console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
list.forEach(next);
|
||||
loadConfig();
|
||||
});
|
||||
}
|
||||
|
||||
function processModules(path, data, plugin){
|
||||
|
@ -326,10 +327,10 @@ define(function(require, exports, module) {
|
|||
});
|
||||
|
||||
services.ace.defineSyntax({
|
||||
name: join(pluginName, "modes", path),
|
||||
name: path,
|
||||
caption: mode.caption,
|
||||
extensions: (mode.extensions || "").trim()
|
||||
.replace(/\s*,\s*/g, "|")
|
||||
.replace(/\s*,\s*/g, "|").replace(/(^|\|)\./g, "$1")
|
||||
});
|
||||
break;
|
||||
case "outline":
|
||||
|
|
|
@ -57,8 +57,11 @@ define(function(require, exports, module) {
|
|||
if (loadFromDisk) {
|
||||
fs.readdir("~/.c9/plugins", function(error, files){
|
||||
files.forEach(function(f) {
|
||||
if (!/^[_.]/.test(f.name))
|
||||
loadOne({packageName: f.name}, false);
|
||||
if (!/^[_.]/.test(f.name)) {
|
||||
fs.exists("~/.c9/plugins/" + f.name + "/__installed__.js", function(exists) {
|
||||
if (exists) loadOne({packageName: f.name}, false);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue