2016-10-24 13:49:17 -04:00
|
|
|
import { registerHelpers } from 'discourse-common/lib/helpers';
|
|
|
|
|
2016-08-25 13:14:56 -04:00
|
|
|
export default {
|
|
|
|
name: 'load-helpers',
|
|
|
|
|
2016-11-25 14:29:24 -05:00
|
|
|
initialize(application) {
|
2016-08-25 13:14:56 -04:00
|
|
|
Object.keys(requirejs.entries).forEach(entry => {
|
|
|
|
if ((/\/helpers\//).test(entry)) {
|
2017-07-05 14:14:30 -04:00
|
|
|
requirejs(entry, null, null, true);
|
2016-08-25 13:14:56 -04:00
|
|
|
}
|
|
|
|
});
|
2016-11-25 14:29:24 -05:00
|
|
|
registerHelpers(application);
|
2016-08-25 13:14:56 -04:00
|
|
|
}
|
|
|
|
};
|