Compile creates a template function
@param {string} tmpl - The html template to compile
@param {object} conf - The configuration to override
@return {function} The template function
4859
function compile(tmpl, conf) {
  const c = Object.assign(
    {},
    settings,
    conf,
  );

  const template = new LayoutTemplate({
    conf: c,
    tmpl,
  });

  return bracket.compile(
    template.compile(),
    template.conf,
  );
}
343837
function compile(template) {
        Mustache.parse(template);
        return function (view, partials) {
          return Mustache.render(template, view, partials);
        };
      }
831036
function parseTmpl(tmpl, paramObj) {
    paramObj = paramObj || paramObj;

    if (typeof tmpl === 'string') {
        return tmpl.replace(/\$([_a-zA-Z0-9]*)\$/g, function (m, n) {
            return typeof paramObj[n] === 'undefined' ? '' : paramObj[n];
        });
    } else {
        return tmpl;
    }
}
63931
function compileTemplate(name) {
        // Directive compile function
        return function (tElement, tAttrs, transclude) {
            var rootElement = document.createElement("div");
            Object.keys(tAttrs).forEach(function (key) {
                if (key[0] !== '$') {
                    rootElement.setAttribute(key, tAttrs[key]);
                }
            });
            var immediateToken;
            // Directive link function
            return function ($scope, elements, attrs, parents) {
                var parent = parents.reduce(function (found, item) { return found || item; });
                parent[name] = function (itemPromise) {
                    // Actual item renderer
                    return WinJS.Promise.as(itemPromise).then(function (item) {
                        var itemScope = $scope.$new();
                        itemScope.item = item;
                        var result = rootElement.cloneNode(false);
                        transclude(itemScope, function (clonedElement) {
                            for (var i = 0, len = clonedElement.length; i < len; i++) {
                                result.appendChild(clonedElement[i]);
                            }
                        });
                        WinJS.Utilities.markDisposable(result, function () {
                            itemScope.$destroy();
                        });
                        immediateToken = immediateToken || setImmediate(function () {
                            immediateToken = null;
                            itemScope.$apply();
                        });
                        return result;
                    })
                };
            };
        };
    }
759135
function (t) {
			if(t.type === "function"){
				var fn = "("+helpers.makeParamsString(t.params)+")";
				
				if(t.constructs && t.constructs.types){
					fn = "constructor"+fn;
					fn += " => "+helpers.makeTypes(t.constructs.types)
				} else {
					fn = "function"+fn;
				}
				
				return fn;
			}
			var type = docMap[t.type];
			var title = type && type.title || undefined;
			var txt = helpers.linkTo(t.type, title);
			
			if(t.template && t.template.length){
				txt += "&lt;"+t.template.map(function(templateItem){
					return helpers.makeTypes(templateItem.types)
				}).join(",")+"&gt;";
			}
			if(type){
				if(type.type === "function" && (type.params || type.signatures)){
					var params = type.params || (type.signatures[0] && type.signatures[0].params ) || []
				} else if(type.type === "typedef" && type.types[0] && type.types[0].type == "function"){
					var params = type.types[0].params;
				}
				if(params){
					txt += "("+helpers.makeParamsString(params)+")";
				}
			}
			
			return txt;
		}
495588
function (data, callback) {
            var html = '';
            var self = this;
            var fn = self.fn;
            callback = callback || function (error, ret) {
                html = ret;
            };
            var name = self.config.name;
            if (!name && fn.TPL_NAME) {
                name = fn.TPL_NAME;
            }
            var scope = new Scope(data), buffer = new LinkedBuffer(callback).head;
            renderTpl({
                name: name,
                fn: fn,
                session: {},
                root: self
            }, scope, buffer);
            return html;
        }
1334138
function compileTemplate( $tpl, $keyData, $uri, $res, $templatePath, &$extraParameters, &$resourceData )
    {
        $key = $this->cacheKey( $keyData, $res, $templatePath, $extraParameters );
        return eZTemplateCompiler::compileTemplate( $tpl, $key, $resourceData );
    }
909017
function(template, options) {
    options = options || {};
    options.pretty = true;
    var fn = jade.compile(template, options);
    return fn(options.locals);
  }
220227
function XTemplateRuntime(tpl, option) {
        var self = this;
        self.tpl = tpl;
        option = S.merge(defaultConfig, option);
        option.subTpls = S.merge(option.subTpls, XTemplateRuntime.subTpls);
        option.commands = S.merge(option.commands, XTemplateRuntime.commands);
        this.option = option;
    }
1094244
public static final ITemplate getTemplate(String tmpl, Object ... args) {
        return engine().getTemplate(tmpl, args);
    }
349956
function compileTemplate () {
    var template = $attrs.$mdTabsTemplate,
        element  = angular.element($element[0].querySelector('md-tab-data'));

    element.html(template);
    $compile(element.contents())(ctrl.parent);
    delete $attrs.$mdTabsTemplate;
  }
465144
function compileTemplate(moduleName, content, quoteChar, indentString, useStrict, htmlmin, process) {
        var contentModified = getContent(content, quoteChar, indentString, htmlmin, process);
        var doubleIndent = indentString + indentString;
        var strict = (useStrict) ? indentString + quoteChar + 'use strict' + quoteChar + ';\n' : '';

        var module = 'angular.module(' + quoteChar + moduleName +
            quoteChar + ', []).run([' + quoteChar + '$templateCache' + quoteChar + ', function($templateCache) ' +
            '{\n' + strict + indentString + '$templateCache.put(' + quoteChar + moduleName + quoteChar + ',\n' + doubleIndent + quoteChar + contentModified +
            quoteChar + ');\n}]);\n';

        return module;
    }
806855
function compile(config) {
    let compiler;
    try {
        compiler = webpack(config);
    }
    catch (error) {
        console.error('Failed to compile.', error);
        process.exitCode = 1;
    }
    return compiler;
}
797012
function createCptWrapper(Ctl, cptArgs) {
    var cw = new CptWrapper(Ctl), att, t, v; // will also create a new controller instance
    if (cptArgs) {
        var cpt=cw.cpt, ni=cptArgs.nodeInstance;
        if (ni.isCptComponent || ni.isCptAttElement) {
            // set the nodeInstance reference on the component
            var $attributes=cptArgs.$attributes, $content=cptArgs.$content;
            cw.nodeInstance = ni;
            cw.cpt.nodeInstance = ni;

            if ($attributes) {
                for (var k in $attributes) {

                    // set the template attribute value on the component instance
                    if ($attributes.hasOwnProperty(k)) {
                        att=cw.cpt.$attributes[k];
                        t=att.type;
                        v=$attributes[k];

                        if (t && ATTRIBUTE_TYPES[t]) {
                            // in case of invalid type an error should already have been logged
                            // a type is defined - so let's convert the value
                            v=ATTRIBUTE_TYPES[t].convert(v, att);
                        }
                        json.set(cpt,k,v);
                    }
                }
            }

            if ($content) {
                if (cpt.$content) {
                  log.error(ni+" Component controller cannot use '$content' for another property than child attribute elements");
                } else {
                  // create the content property on the component instance
                  json.set(cpt,"$content",$content);
                }
            }
        }
    }
    return cw;
}
334035
function (f, content) {
    var path = config.getLayout(f);
    if (!path) return content;
    if (!fss.exists(path)) return content;
    return compile(f, fss.readFile(path),
        _.extend(templateData({}), { content: content }));
}
263028
function createSwigTemplates() {
   swig.setFilter( 'wrap', ( input, wrapper, condition ) =>
      condition === undefined || condition ? wrapper + input + wrapper : input
   );
   swig.setFilter( 'if', ( input, condition ) => condition ? input : '' );
   swig.setFilter( 'replaceLinks', ( input, condition ) => condition ? input : '' );
   swig.setDefaults( {
      autoescape: false,
      locals: {
         isFunction
      }
   } );

   const templateDir = templateName => path.join( __dirname, `../templates/${templateName}.md.tmpl` );
   return {
      doc: swig.compileFile( templateDir( 'doc_template' ) ),
      toc: swig.compileFile( templateDir( 'toc_template' ) ),
      type: swig.compileFile( templateDir( 'type_template' ) ),
      function: swig.compileFile( templateDir( 'function_template' ) ),
      property: swig.compileFile( templateDir( 'property_template' ) )
   };
}
1076049
function parseTemplate(conf, tmpl) {
  // header
  let header = {};
  let cleanTmpl = tmpl.replace(conf.header, (m, headerStr) => {
    header = yaml.safeLoad(headerStr);
    return '';
  });

  // dependencies
  const deps = new LayoutDependency();

  const masterPath = header[conf.keys.master];
  if (masterPath) {
    deps.master = {
      path: lookupFile(conf, header[conf.keys.master]),
    };
  }

  // replace partial call's relative path to full path
  cleanTmpl = cleanTmpl.replace(conf.partial, (m, partialPath) => {
    const fullPath = lookupFile(conf, partialPath);
    deps.partials.set(
      partialPath,
      {
        path: fullPath,
      },
    );
    return m.replace(partialPath, fullPath);
  });

  return {
    header,
    deps,
    tmpl: cleanTmpl,
  };
}