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