kopia lustrzana https://github.com/c9/core
fix handling of plugins config from package.json
rodzic
bf5aede66e
commit
21cc0a2047
|
@ -555,7 +555,12 @@ define(function(require, exports, module) {
|
||||||
additional.push({
|
additional.push({
|
||||||
id: path,
|
id: path,
|
||||||
source: 'define("' + path + '", [],' +
|
source: 'define("' + path + '", [],' +
|
||||||
JSON.stringify(packedConfig, null, 4) + ');',
|
JSON.stringify(packedConfig.map(function(p) {
|
||||||
|
var name = p.slice(p.lastIndexOf("/") + 1)
|
||||||
|
var options = json.plugins[name] || {};
|
||||||
|
options.packagePath = p;
|
||||||
|
return options;
|
||||||
|
}), null, 4) + ');',
|
||||||
literal : true,
|
literal : true,
|
||||||
order: -1
|
order: -1
|
||||||
});
|
});
|
||||||
|
|
|
@ -103,10 +103,10 @@ define(function(require, exports, module) {
|
||||||
requirejs.undef(root + "/__installed__.js");
|
requirejs.undef(root + "/__installed__.js");
|
||||||
require([root + "/__installed__"], function(plugins) {
|
require([root + "/__installed__"], function(plugins) {
|
||||||
var config = plugins.map(function(p) {
|
var config = plugins.map(function(p) {
|
||||||
return {
|
if (typeof p == "string")
|
||||||
staticPrefix: host + join(base, paths[root]),
|
p = { packagePath: p };
|
||||||
packagePath: p
|
p.staticPrefix = host + join(base, paths[root]);
|
||||||
};
|
return p;
|
||||||
});
|
});
|
||||||
|
|
||||||
architect.loadAdditionalPlugins(config, function(err){
|
architect.loadAdditionalPlugins(config, function(err){
|
||||||
|
|
Ładowanie…
Reference in New Issue