-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
146 additions
and
93 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,31 @@ | ||
|
||
|
||
import TemplateRenderer, { cache } from './modules/renderer-template.js'; | ||
|
||
export default function Literal(id) { | ||
// TODO: I don't think this works, it replaces whatever template is in the | ||
// DOM, it it probably isn't in the DOM if it's cached? | ||
|
||
const id = typeof id === 'object' ? | ||
id.id || '' : | ||
id ; | ||
|
||
if (cache[id]) { | ||
return cache[id].create(); | ||
} | ||
|
||
const template = typeof id === 'object' ? | ||
id : | ||
document.getElementById(id) ; | ||
|
||
return new TemplateRenderer(template) ; | ||
} | ||
|
||
// TODO: Legacy, remove | ||
export { TemplateRenderer as Renderer }; | ||
|
||
export { compiled } from './modules/renderer/compile.js'; | ||
export { default as config } from './modules/config.js'; | ||
export { default as Data, observe } from './modules/data.js'; | ||
export { default as Renderer } from './modules/renderer-template.js'; | ||
export { default as scope } from './modules/scope.js'; | ||
export { urls } from './modules/urls.js'; |
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
|
||
import { Observer as Data, getTarget } from '../../fn/observer/observer.js'; | ||
import observe from '../../fn/observer/observe.js'; | ||
|
||
Data.getObject = getTarget; | ||
Data.observe = observe; | ||
|
||
export default Data; | ||
export { default as observe } from '../../fn/observer/observe.js'; | ||
export { observe }; |
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
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
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
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
Oops, something went wrong.