Merge remote branch 'mozilla/master'
Conflicts: .gitignore support/cockpit
This commit is contained in:
commit
5cc67ba146
4 changed files with 14 additions and 135 deletions
12
.gitignore
vendored
12
.gitignore
vendored
|
|
@ -1,4 +1,14 @@
|
|||
# Junk that could exist anywhere:
|
||||
.DS_Store
|
||||
*.swp
|
||||
*.tmp
|
||||
|
||||
# Project files that should not be in the repo
|
||||
.project
|
||||
.settings/
|
||||
.settings.xml
|
||||
.settings.xml.old
|
||||
.*.gz
|
||||
.*.gz
|
||||
|
||||
# A handy place to put stuff that git should ignore:
|
||||
/ignore/
|
||||
17
.project
17
.project
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>editor</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
118
demo/boot.js
118
demo/boot.js
|
|
@ -35,117 +35,6 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
setupPlugins(function(plugin_manager, settings) {
|
||||
var data = { env: { settings: settings } };
|
||||
plugin_manager.catalog.startupPlugins(data, plugin_manager.REASONS.APP_STARTUP).then(function() {
|
||||
var demo_startup = require("demo_startup");
|
||||
demo_startup.launch(data.env);
|
||||
});
|
||||
});
|
||||
|
||||
// TODO: Yuck! A global function
|
||||
var setupPlugins = function(callback) {
|
||||
var config = {
|
||||
pluginDirs: {
|
||||
"../demo": {
|
||||
singleFiles: ["demo_startup"]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (!config.pluginDirs) {
|
||||
config.pluginDirs = {};
|
||||
}
|
||||
// config.pluginDirs["../lib"] = {
|
||||
// packages: ["ace"]
|
||||
// };
|
||||
config.pluginDirs["../support/cockpit/support/pilot/lib"] = {
|
||||
packages: [ "pilot" ]
|
||||
};
|
||||
config.pluginDirs["../support/cockpit/lib"] = {
|
||||
packages: [ "cockpit" ]
|
||||
};
|
||||
|
||||
var knownPlugins = [];
|
||||
|
||||
var pluginPackageInfo = {
|
||||
"../lib": [
|
||||
{
|
||||
name: "ace",
|
||||
lib: "."
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
var paths = {};
|
||||
var i;
|
||||
var location;
|
||||
|
||||
// we need to ensure that the core plugin directory is loaded first
|
||||
var pluginDirs = [];
|
||||
var pluginDir;
|
||||
for (pluginDir in config.pluginDirs) {
|
||||
pluginDirs.push(pluginDir);
|
||||
}
|
||||
pluginDirs.sort(function(a, b) {
|
||||
if (a == "../plugins") {
|
||||
return -1;
|
||||
} else if (b == "../plugins") {
|
||||
return 1;
|
||||
} else if (a < b) {
|
||||
return -1;
|
||||
} else if (b < a) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
|
||||
// set up RequireJS to know that our plugins all have a main module called "index"
|
||||
for (var dirNum = 0; dirNum < pluginDirs.length; dirNum++) {
|
||||
pluginDir = pluginDirs[dirNum];
|
||||
var dirInfo = config.pluginDirs[pluginDir];
|
||||
if (dirInfo.packages) {
|
||||
location = pluginPackageInfo[pluginDir];
|
||||
if (location === undefined) {
|
||||
pluginPackageInfo[pluginDir] = location = [];
|
||||
}
|
||||
var packages = dirInfo.packages;
|
||||
for (i = 0; i < packages.length; i++) {
|
||||
location.push({
|
||||
name: packages[i],
|
||||
main: "index",
|
||||
lib: "."
|
||||
});
|
||||
knownPlugins.push(packages[i] + "/index");
|
||||
}
|
||||
}
|
||||
if (dirInfo.singleFiles) {
|
||||
for (i = 0; i < dirInfo.singleFiles.length; i++) {
|
||||
var pluginName = dirInfo.singleFiles[i];
|
||||
paths[pluginName] = pluginDir + "/" + pluginName;
|
||||
knownPlugins.push(pluginName);
|
||||
}
|
||||
}
|
||||
}
|
||||
require({
|
||||
packagePaths: pluginPackageInfo,
|
||||
paths: paths
|
||||
});
|
||||
require(["pilot/fixoldbrowsers", "pilot/plugin_manager", "pilot/settings"], function() {
|
||||
var pluginsModule = require("pilot/plugin_manager");
|
||||
var settings = require("pilot/settings").settings;
|
||||
var catalog = pluginsModule.catalog;
|
||||
catalog.registerPlugins(knownPlugins).then(function() {
|
||||
if (callback) {
|
||||
callback(pluginsModule, settings);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
*/
|
||||
|
||||
var config = {
|
||||
packagePaths: {
|
||||
"../lib": [
|
||||
|
|
@ -166,13 +55,10 @@ var deps = [ "pilot/fixoldbrowsers", "pilot/plugin_manager", "pilot/settings",
|
|||
|
||||
require(config, deps, function() {
|
||||
var catalog = require("pilot/plugin_manager").catalog;
|
||||
var REASON_START = require("pilot/plugin_manager").REASONS.APP_STARTUP;
|
||||
var settings = require("pilot/settings").settings;
|
||||
|
||||
catalog.registerPlugins([ "pilot/index", "cockpit/index" ]).then(function() {
|
||||
var env = require("pilot/environment").create();
|
||||
catalog.startupPlugins({ env:env }, REASON_START).then(function() {
|
||||
require("demo_startup").launch(env);
|
||||
catalog.startupPlugins({ env: env }).then(function() {
|
||||
require("demo_startup").launch(env);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 4fe1c8a835f81f32402b7c81a598abc7009b59be
|
||||
Subproject commit fe35847349bb96f5c5d9d559a2ff72cef0d9ae83
|
||||
Loading…
Add table
Add a link
Reference in a new issue