2020-05-01 15:18:41 -04:00
|
|
|
// discourse-skip-module
|
|
|
|
|
|
|
|
(function () {
|
|
|
|
if (window.unsupportedBrowser) {
|
|
|
|
throw "Unsupported browser detected";
|
|
|
|
}
|
2021-01-12 10:13:21 -05:00
|
|
|
|
2020-05-05 14:54:13 -04:00
|
|
|
let Discourse = requirejs("discourse/app").default.create();
|
2020-05-01 15:18:41 -04:00
|
|
|
|
2020-05-05 12:15:03 -04:00
|
|
|
// required for our template compiler
|
|
|
|
window.__DISCOURSE_RAW_TEMPLATES = requirejs(
|
|
|
|
"discourse-common/lib/raw-templates"
|
|
|
|
).__DISCOURSE_RAW_TEMPLATES;
|
|
|
|
|
2021-01-12 10:13:21 -05:00
|
|
|
// required for addons to work without Ember CLI
|
2022-03-09 11:54:07 -05:00
|
|
|
// eslint-disable-next-line no-undef
|
2020-08-28 15:30:20 -04:00
|
|
|
Object.keys(Ember.TEMPLATES).forEach((k) => {
|
|
|
|
if (k.indexOf("select-kit") === 0) {
|
2022-03-09 11:54:07 -05:00
|
|
|
// eslint-disable-next-line no-undef
|
2020-08-28 15:30:20 -04:00
|
|
|
let template = Ember.TEMPLATES[k];
|
|
|
|
define(k, () => template);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2020-05-01 15:18:41 -04:00
|
|
|
// ensure Discourse is added as a global
|
|
|
|
window.Discourse = Discourse;
|
|
|
|
})();
|