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

15 lines
329 B
Plaintext
Raw Normal View History

import { registerHelpers } from 'discourse-common/lib/helpers';
2016-08-26 01:14:56 +08:00
export default {
name: 'load-helpers',
2016-11-26 03:29:24 +08:00
initialize(application) {
2016-08-26 01:14:56 +08:00
Object.keys(requirejs.entries).forEach(entry => {
if ((/\/helpers\//).test(entry)) {
require(entry, null, null, true);
}
});
2016-11-26 03:29:24 +08:00
registerHelpers(application);
2016-08-26 01:14:56 +08:00
}
};