mirror of
https://github.com/discourse/discourse.git
synced 2025-02-18 00:13:15 +08:00
![Robin Ward](/assets/img/avatar_default.png)
We were sharing `Discourse` both as an application object and a namespace which complicated things for Ember CLI. This patch moves raw templates into `__DISCOURSE_RAW_TEMPLATES` and adds a couple helper methods to create/remove them.
17 lines
418 B
JavaScript
17 lines
418 B
JavaScript
// discourse-skip-module
|
|
|
|
(function() {
|
|
if (window.unsupportedBrowser) {
|
|
throw "Unsupported browser detected";
|
|
}
|
|
let Discourse = requirejs("discourse/app").default;
|
|
|
|
// required for our template compiler
|
|
window.__DISCOURSE_RAW_TEMPLATES = requirejs(
|
|
"discourse-common/lib/raw-templates"
|
|
).__DISCOURSE_RAW_TEMPLATES;
|
|
|
|
// ensure Discourse is added as a global
|
|
window.Discourse = Discourse;
|
|
})();
|