discourse/app/assets/javascripts/wizard/initializers/load-helpers.js.es6

15 lines
334 B
JavaScript

import { registerHelpers } from 'discourse-common/lib/helpers';
export default {
name: 'load-helpers',
initialize(container, registry) {
Object.keys(requirejs.entries).forEach(entry => {
if ((/\/helpers\//).test(entry)) {
require(entry, null, null, true);
}
});
registerHelpers(registry);
}
};