fix handling of plugins config from package.json

pull/117/merge
nightwing 2015-06-05 03:17:07 +04:00
rodzic bf5aede66e
commit 21cc0a2047
2 zmienionych plików z 10 dodań i 5 usunięć

Wyświetl plik

@ -555,7 +555,12 @@ define(function(require, exports, module) {
additional.push({
id: 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,
order: -1
});

Wyświetl plik

@ -103,10 +103,10 @@ define(function(require, exports, module) {
requirejs.undef(root + "/__installed__.js");
require([root + "/__installed__"], function(plugins) {
var config = plugins.map(function(p) {
return {
staticPrefix: host + join(base, paths[root]),
packagePath: p
};
if (typeof p == "string")
p = { packagePath: p };
p.staticPrefix = host + join(base, paths[root]);
return p;
});
architect.loadAdditionalPlugins(config, function(err){