-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.js
37 lines (33 loc) · 887 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Node Templates
*
* Notes:
* 1. Exceptions defined in the errors module:
* _TemplateError_ and _TemplateSyntaxError_
* with their respective shorthands _TE_ and _TSE_
*
* 2. Template class is separated from its prototype
* to avoid circular requires.
*
* Dependencies:
* String.prototype.fmt which uses ext's sprintf() function
* Object.merge from ext
* Object.getPath from strobex
*
* How it Works ?
*
* TODO: Document here
*/
require( "./extensions" );
var T = require('./template')
, C = require('./context')
, TP = require('./templateproto')
, TO = require('./tokens');
exports.version = "0.1";
exports.Context = C.Context;
exports.Template = T.Template;
exports.setTemplatesDir = TP.setTemplatesDir;
exports.setDebug = function( bool ){
TP.setCache( bool );
TO.setVarMissingWarning( bool );
};