-
Notifications
You must be signed in to change notification settings - Fork 0
0.3.0
ivansglazunov edited this page Feb 17, 2015
·
25 revisions
- JavaScript
- Pure object model
- Sync and async data
- Inheritance simplicity
npm install -g osws-templates`
-
Templates
- .include(id: string)
- .include(id: string)
- .render(data: TData, callback: TCallback, context?: TContext)
- .renderContext(string: string, context: Object, callback: TCallback)
- .renderAttributes(attributes: TAttributes, callback: TCallback, context?: TContext)
- [.renderSelector(attributes: TAttributes, selector: TSelector)](0.3.0-Templates#renderSelector)
- TData: Renderer|sync|async|Mixin
- TCallback: (error, result) => void
- TSelector: string
- TInjector: () => void
- TAttributes: [name: string]: TData
- TContext: TData
Node.js:
var T = require('oswst');
Require.js:
define(['oswst'], function(T) {});
window
:
var T = window.oswst(_, async);
-
Templates
- .compile
- .include
- .render
- .renderContext
- .renderAttributes
- .renderSelector
- .sync
- .isSyncFunction
- .async
- .isAsyncFunction
- .Prototype()
- .Renderer > .Prototype
- .Data > .Renderer
- .data > .Data
- .Tag > .data
- .Single > .Tag
- .singles[string]
- .Double > .Tag
- .doubles[string]
- .Doctype > .Tag
- .doctypes[string]
- .xml > .Tag
- .Mixin > .Data
- .mixin > .Mixin
- .mixins[string]
- .Module > .Renderer
- .with