-
Notifications
You must be signed in to change notification settings - Fork 0
0.3.0 with
Ivan S Glazunov edited this page Feb 20, 2015
·
2 revisions
Good way to add into the context of all possible module tools.
Added: sync
async
Renderer
data
Data
xml
doctypes
Doctype
singles[string]
Single
doubles[string]
Double
Mixin
mixin
mixins[string]
Module
with (T.with) {
console.log(sync(function() { return 123; })); // 123
console.log(async(function(callback) { callback(null, 123); })); // 123
console.log(data(123)); // 123
console.log(doctypes.html)); // <!DOCTYPES html>
console.log(img)); // <img/>
console.log(div)); // <div/>
var m = mixin(function(a, b, c) { return a+b+c; });
console.log(m(1, 2, 3));
}
- 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