-
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not use global ember -- internalize template resolution cache
- Loading branch information
1 parent
fe73b7d
commit 3a6ed80
Showing
4 changed files
with
48 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Originally: https://github.com/emberjs/ember.js/blob/28444d536fa20debef2a67e2f18c5eb11113a4b5/packages/%40ember/-internals/glimmer/lib/template_registry.ts#L9 | ||
* | ||
* import { TEMPLATES } from 'ember'; | ||
* | ||
* Removed for RFC 1003 | ||
*/ | ||
export let TEMPLATES = {}; | ||
|
||
export function setTemplates(templates) { | ||
TEMPLATES = templates; | ||
} | ||
|
||
export function getTemplates() { | ||
return TEMPLATES; | ||
} | ||
|
||
export function getTemplate(name) { | ||
if (Object.prototype.hasOwnProperty.call(TEMPLATES, name)) { | ||
return TEMPLATES[name]; | ||
} | ||
} | ||
|
||
export function hasTemplate(name) { | ||
return Object.prototype.hasOwnProperty.call(TEMPLATES, name); | ||
} | ||
|
||
export function setTemplate(name, template) { | ||
return (TEMPLATES[name] = template); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters