2019-11-20 13:08:04 +01:00
|
|
|
import { buildResolver } from "discourse-common/resolver";
|
2017-09-29 13:27:03 +02:00
|
|
|
|
2019-11-20 13:08:04 +01:00
|
|
|
export default Ember.Application.extend({
|
2021-02-24 08:43:35 +01:00
|
|
|
rootElement: "#custom-wizard-main",
|
2019-11-20 13:08:04 +01:00
|
|
|
Resolver: buildResolver("wizard"),
|
|
|
|
|
|
|
|
start() {
|
|
|
|
Object.keys(requirejs._eak_seen).forEach((key) => {
|
|
|
|
if (/\/pre\-initializers\//.test(key)) {
|
|
|
|
const module = requirejs(key, null, null, true);
|
|
|
|
if (!module) {
|
|
|
|
throw new Error(key + " must export an initializer.");
|
|
|
|
}
|
2021-02-24 08:43:35 +01:00
|
|
|
|
2019-11-20 13:08:04 +01:00
|
|
|
const init = module.default;
|
|
|
|
const oldInitialize = init.initialize;
|
|
|
|
init.initialize = () => {
|
|
|
|
oldInitialize.call(this, this.__container__, this);
|
|
|
|
};
|
|
|
|
|
|
|
|
this.initializer(init);
|
|
|
|
}
|
|
|
|
});
|
2021-02-24 08:43:35 +01:00
|
|
|
|
|
|
|
Object.keys(requirejs._eak_seen).forEach((key) => {
|
2020-10-02 06:40:10 +02:00
|
|
|
if (/\/initializers\//.test(key)) {
|
|
|
|
const module = requirejs(key, null, null, true);
|
|
|
|
if (!module) {
|
|
|
|
throw new Error(key + " must export an initializer.");
|
|
|
|
}
|
|
|
|
this.initializer(module.default);
|
|
|
|
}
|
|
|
|
});
|
2021-02-24 08:43:35 +01:00
|
|
|
},
|
2017-09-29 13:27:03 +02:00
|
|
|
});
|