plugins can now pass in scripts in plugin.json, and they will be bundled into nodebb.min.js

v1.18.x
Julian Lam 11 years ago
parent 14d7453a23
commit 3860abdc24

@ -223,6 +223,20 @@ var fs = require('fs'),
}));
}
next();
},
function(next) {
// Client-side scripts
if (pluginData.scripts && pluginData.scripts instanceof Array) {
if (global.env === 'development') {
winston.info('[plugins] Found ' + pluginData.scripts.length + ' js file(s) for plugin ' + pluginData.id);
}
Plugins.clientScripts = Plugins.clientScripts.concat(pluginData.scripts.map(function(file) {
return path.join(pluginData.id, file);
}));
}
next();
}
], function(err) {

Loading…
Cancel
Save