Lines Matching refs:options
139 Transformer.prototype.compile = function (str, options) { argument
145 return tr.normalize(_this._tr.render(str, options, locals)).body;
158 return tr.normalizeFn(this._tr.compile(str, options));
160 Transformer.prototype.compileAsync = function (str, options, cb) { argument
165 return tr.normalizeFnAsync(this._tr.compileAsync(str, options), cb);
167 return tr.normalizeFnAsync(this.compile(str, options), cb);
170 Transformer.prototype.compileFile = function (filename, options) { argument
175 return tr.normalizeFn(this._tr.compileFile(filename, options));
178 return tr.normalize(this._tr.renderFile(filename, options, locals)).body;
181 if (!options) options = {};
182 if (options.filename === undefined) options.filename = filename;
183 return this.compile(tr.readFileSync(filename, 'utf8'), options);
186 Transformer.prototype.compileFileAsync = function (filename, options, cb) { argument
191 return tr.normalizeFnAsync(this._tr.compileFileAsync(filename, options), cb);
193 return tr.normalizeFnAsync(this.compileFile(filename, options), cb);
195 if (!options) options = {};
196 if (options.filename === undefined) options.filename = filename;
199 return this._tr.compileAsync(str, options);
201 return this.compile(str, options);
210 Transformer.prototype.compileClient = function (str, options) { argument
220 return tr.normalize(this._tr.compileClient(str, options));
222 Transformer.prototype.compileClientAsync = function (str, options, cb) { argument
231 return tr.normalizeAsync(this._tr.compileClientAsync(str, options), cb);
233 return tr.normalizeAsync(this._tr.compileClient(str, options), cb);
236 Transformer.prototype.compileFileClient = function (filename, options) { argument
245 return tr.normalize(this._tr.compileFileClient(filename, options));
247 if (!options) options = {};
248 if (options.filename === undefined) options.filename = filename;
249 return tr.normalize(this._tr.compileClient(tr.readFileSync(filename, 'utf8'), options));
252 Transformer.prototype.compileFileClientAsync = function (filename, options, cb) { argument
257 return tr.normalizeAsync(this._tr.compileFileClientAsync(filename, options), cb);
259 return tr.normalizeAsync(this._tr.compileFileClient(filename, options), cb);
261 if (!options) options = {};
262 if (options.filename === undefined) options.filename = filename;
265 return this._tr.compileClientAsync(str, options);
267 return this._tr.compileClient(str, options);
275 Transformer.prototype.render = function (str, options, locals) { argument
286 return tr.normalize(this._tr.render(str, options, locals));
288 var compiled = tr.normalizeFn(this._tr.compile(str, options));
289 var body = compiled.fn(locals || options);
296 Transformer.prototype.renderAsync = function (str, options, locals, cb) { argument
299 locals = options;
309 return tr.normalizeAsync(this._tr.renderAsync(str, options, locals), cb);
311 return tr.normalizeAsync(this._tr.render(str, options, locals), cb);
313 return tr.normalizeAsync(this.compileAsync(str, options).then(function (compiled) {
314 return {body: compiled.fn(locals || options), dependencies: compiled.dependencies};
318 Transformer.prototype.renderFile = function (filename, options, locals) { argument
324 return tr.normalize(this._tr.renderFile(filename, options, locals));
326 if (!options) options = {};
327 if (options.filename === undefined) options.filename = filename;
328 return tr.normalize(this._tr.render(tr.readFileSync(filename, 'utf8'), options, locals));
330 var compiled = this.compileFile(filename, options);
331 … return tr.normalize({body: compiled.fn(locals || options), dependencies: compiled.dependencies});
334 Transformer.prototype.renderFileAsync = function (filename, options, locals, cb) { argument
341 locals = options;
344 return tr.normalizeAsync(this._tr.renderFileAsync(filename, options, locals), cb);
346 return tr.normalizeAsync(this._tr.renderFile(filename, options, locals), cb);
349 return tr.normalizeAsync(this.compileFileAsync(filename, options).then(function (compiled) {
350 return {body: compiled.fn(locals || options), dependencies: compiled.dependencies};
353 if (!options) options = {};
354 if (options.filename === undefined) options.filename = filename;
356 return this.renderAsync(str, options, locals);