mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 18:46:01 +01:00
let plugins.js allow widgets to utilize hooks
This commit is contained in:
@@ -375,8 +375,10 @@ var fs = require('fs'),
|
|||||||
dirs = dirs.map(function(file) {
|
dirs = dirs.map(function(file) {
|
||||||
return path.join(npmPluginPath, file);
|
return path.join(npmPluginPath, file);
|
||||||
}).filter(function(file) {
|
}).filter(function(file) {
|
||||||
var stats = fs.statSync(file);
|
var stats = fs.statSync(file),
|
||||||
if (stats.isDirectory() && file.substr(npmPluginPath.length + 1, 14) === 'nodebb-plugin-') return true;
|
isPlugin = file.substr(npmPluginPath.length + 1, 14) === 'nodebb-plugin-' || file.substr(npmPluginPath.length + 1, 14) === 'nodebb-widget-';
|
||||||
|
|
||||||
|
if (stats.isDirectory() && isPlugin) return true;
|
||||||
else return false;
|
else return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user