mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
fix handling of plugins config from package.json
This commit is contained in:
parent
bf5aede66e
commit
21cc0a2047
@ -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
|
||||
});
|
||||
|
||||
@ -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){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user