mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
Support scoped theme packages
This commit is contained in:
committed by
Julian Lam
parent
d656c65c9a
commit
70ff2d9b88
@@ -122,13 +122,16 @@ module.exports = function (Plugins) {
|
||||
], callback);
|
||||
};
|
||||
|
||||
var themeNamePattern = /(@.*?\/)?nodebb-theme-.*$/;
|
||||
|
||||
Plugins.loadPlugin = function (pluginPath, callback) {
|
||||
Plugins.data.loadPluginInfo(pluginPath, function (err, pluginData) {
|
||||
if (err) {
|
||||
if (err.message === '[[error:parse-error]]') {
|
||||
return callback();
|
||||
}
|
||||
return callback(pluginPath.match('nodebb-theme') ? null : err);
|
||||
|
||||
return callback(themeNamePattern.test(pluginPath) ? null : err);
|
||||
}
|
||||
|
||||
checkVersion(pluginData);
|
||||
|
||||
Reference in New Issue
Block a user