Lines Matching refs:options

43 function applyPlugins(value, options, plugins, name) {  argument
47 ? plugin[name](value, options)
81 function compileBody(str, options){ argument
83 debug_sources[options.filename] = str;
85 var plugins = options.plugins || [];
87 filename: options.filename,
88 basedir: options.basedir,
89 lex: function (str, options) { argument
91 Object.keys(options).forEach(function (key) {
92 lexOptions[key] = options[key];
99 var contents = applyPlugins(str, {filename: options.filename}, plugins, 'preLex');
100 return applyPlugins(lex(contents, lexOptions), options, plugins, 'postLex');
102 parse: function (tokens, options) { argument
113 tokens = stripComments(tokens, options);
114 tokens = applyPlugins(tokens, options, plugins, 'preParse');
116 Object.keys(options).forEach(function (key) {
117 parseOptions[key] = options[key];
126 applyPlugins(parse(tokens, parseOptions), options, plugins, 'postParse'),
127 options, plugins, 'preLoad'
133 return replacementFunc(filename, source, options);
145 contents = replacementFunc(filename, options);
154 ast = applyPlugins(ast, options, plugins, 'postLoad');
155 ast = applyPlugins(ast, options, plugins, 'preFilters');
161 if (options.filters) {
162 Object.keys(options.filters).forEach(function (key) {
163 filtersSet[key] = options.filters[key];
166 ast = filters.handleFilters(ast, filtersSet, options.filterOptions, options.filterAliases);
168 ast = applyPlugins(ast, options, plugins, 'postFilters');
169 ast = applyPlugins(ast, options, plugins, 'preLink');
171 ast = applyPlugins(ast, options, plugins, 'postLink');
174 ast = applyPlugins(ast, options, plugins, 'preCodeGen');
176 pretty: options.pretty,
177 compileDebug: options.compileDebug,
178 doctype: options.doctype,
179 inlineRuntimeFunctions: options.inlineRuntimeFunctions,
180 globals: options.globals,
181 self: options.self,
182 includeSources: options.includeSources ? debug_sources : false,
183 templateName: options.templateName
185 js = applyPlugins(js, options, plugins, 'postCodeGen');
188 if (options.debug) {
209 function handleTemplateCache (options, str) { argument
210 var key = options.filename;
211 if (options.cache && exports.cache[key]) {
214 if (str === undefined) str = fs.readFileSync(options.filename, 'utf8');
215 var templ = exports.compile(str, options);
216 if (options.cache) exports.cache[key] = templ;
237 exports.compile = function(str, options){ argument
238 var options = options || {}
243 compileDebug: options.compileDebug !== false,
244 filename: options.filename,
245 basedir: options.basedir,
246 pretty: options.pretty,
247 doctype: options.doctype,
248 inlineRuntimeFunctions: options.inlineRuntimeFunctions,
249 globals: options.globals,
250 self: options.self,
251 includeSources: options.compileDebug === true,
252 debug: options.debug,
254 filters: options.filters,
255 filterOptions: options.filterOptions,
256 filterAliases: options.filterAliases,
257 plugins: options.plugins,
260 var res = options.inlineRuntimeFunctions
286 exports.compileClientWithDependenciesTracked = function(str, options){ argument
287 var options = options || {};
291 compileDebug: options.compileDebug,
292 filename: options.filename,
293 basedir: options.basedir,
294 pretty: options.pretty,
295 doctype: options.doctype,
296 inlineRuntimeFunctions: options.inlineRuntimeFunctions !== false,
297 globals: options.globals,
298 self: options.self,
299 includeSources: options.compileDebug,
300 debug: options.debug,
301 templateName: options.name || 'template',
302 filters: options.filters,
303 filterOptions: options.filterOptions,
304 filterAliases: options.filterAliases,
305 plugins: options.plugins
310 if(options.module) {
311 if(options.inlineRuntimeFunctions === false) {
314 body += ' module.exports = ' + (options.name || 'template') + ';';
335 exports.compileClient = function (str, options) { argument
336 return exports.compileClientWithDependenciesTracked(str, options).body;
353 exports.compileFile = function (path, options) { argument
354 options = options || {};
355 options.filename = path;
356 return handleTemplateCache(options);
374 exports.render = function(str, options, fn){ argument
376 if ('function' == typeof options) {
377 fn = options, options = undefined;
382 res = exports.render(str, options);
389 options = options || {};
392 if (options.cache && !options.filename) {
396 return handleTemplateCache(options, str)(options);
409 exports.renderFile = function(path, options, fn){ argument
411 if ('function' == typeof options) {
412 fn = options, options = undefined;
417 res = exports.renderFile(path, options);
424 options = options || {};
426 options.filename = path;
427 return handleTemplateCache(options)(options);
440 exports.compileFileClient = function(path, options){ argument
442 options = options || {};
444 options.filename = path;
446 if (options.cache && exports.cache[key]) {
450 var str = fs.readFileSync(options.filename, 'utf8');
451 var out = exports.compileClient(str, options);
452 if (options.cache) exports.cache[key] = out;
460 exports.__express = function(path, options, fn) { argument
461 if(options.compileDebug == undefined && process.env.NODE_ENV === 'production') {
462 options.compileDebug = false;
464 exports.renderFile(path, options, fn);