Creates a new `Templator` instance.
@name Templator
@function
@param {Object} options An object containing the following fields:

- `path` (String): The path to look for markdown partials.
165010
function (options) {
  if (typeof options === 'string') {
    options = {
      path: options
    };
  }

  options = ul.merge(options, {
    path: './'
  });

  options.path = path.resolve(options.path);

  this.options = options;
  this.cwd = options.path;
}
1218088
function (tpl, option) {
            var code = compiler.compile(tpl);
            option = option || {};
            // eval is not ok for eval("(function(){})") ie
            return (Function.apply(null, []
                .concat(code.params)
                .concat(code.source.join('\n') + '//@ sourceURL=' +
                    (option.name ? option.name : ('xtemplate' + (xtemplateId++))) + '.js')));
        }
234284
function (options, file, callback) {
  options.logger('Generating template from ' + file)

  async.waterfall([
    async.apply(fs.readFile, file),
    function (template, callback) {
      var result = _.template(template)(options)
      options.logger('Generated template from ' + file + '\n' + result)
      callback(null, result)
    }
  ], callback)
}
1210212
function (srcPath, options) {
        _.defaults(options || (options = {}), DEFAULT_OPTIONS);
        var separator = options.separator;
        var extname = path.extname(srcPath);
        var reg = new RegExp('^.+' + separator + '(.+)((' + separator + '.+)|(@\\d+x))\\' + extname + '$');
        if (extname === '.styl' || extname === '.css') {
            reg = new RegExp('^.+' + separator + '(.+)\\' + extname + '$');
        }
        var result = path.basename(srcPath).match(reg);
        return result && result[1];
    }
830597
function TmplObject(markup, options) {
		// Template object constructor
		var htmlTag,
			wrapMap = $viewsSettings.wrapMap || {},
			tmpl = $extend(
				{
					markup: markup,
					tmpls: [],
					links: {},
					bnds: [],
					render: renderContent
				},
				options
			);

		if (!options.htmlTag) {
			// Set tmpl.tag to the top-level HTML tag used in the template, if any...
			htmlTag = rFirstElem.exec(markup);
			tmpl.htmlTag = htmlTag ? htmlTag[1].toLowerCase() : "";
		}
		htmlTag = wrapMap[tmpl.htmlTag];
		if (htmlTag && htmlTag !== wrapMap.div) {
			// When using JsViews, we trim templates which are inserted into HTML contexts where text nodes are not rendered (i.e. not 'Phrasing Content').
			tmpl.markup = $.trim(tmpl.markup);
			tmpl._elCnt = TRUE; // element content model (no rendered text nodes), not phrasing content model
		}

		return tmpl;
	}
770346
function (srcPath, options) {
        _.defaults(options || (options = {}), DEFAULT_OPTIONS);
        var separator = options.separator;
        var heads = options.heads;

        return _.some(_.map(heads, function (head) {
            var reg = new RegExp('^' + head + separator + '.+\\.styl$');
            return reg.test(path.basename(srcPath));
        }));
    }
177360
function Call(path) {
  if (typeof path !== 'string' || arguments.length > 1) { throw new Error('Property decorators can be used for single property access') }
  return createDecorator((options, key) => {
    if (!options.methods) options.methods = {}
    options.methods[key] = call(path)
  })
}
247975
function (moduleName, filepath, options) {
    var quoteChar = options.quoteChar;
    var indentString = options.indentString;
    var withModule = !options.singleModule;
    var content = getContent(filepath, options);
    var doubleIndent = indentString + indentString;
    var strict = (options.useStrict) ? indentString + quoteChar + 'use strict' + quoteChar + ';\n' : '';
    var compiled = '';

    if (withModule) {
      compiled += 'angular.module(' + quoteChar + moduleName +
        quoteChar + ', []).run([' + quoteChar + '$templateCache' + quoteChar + ', function($templateCache) {\n' + strict;
    }

    compiled += indentString + '$templateCache.put(' + quoteChar + moduleName + quoteChar +
      ',\n' + doubleIndent + quoteChar + content + quoteChar + ');';

    if (withModule) {
      compiled += '\n}]);\n';
    }

    return compiled;
  }
1265221
function renderTmpl (path, vars, callback) {
    fs.readFile(path, 'utf8', function (err, file) {
        if (err) {
            return callback(err);
        }
        var out = file.replace(/\{\{([a-z]+)\}\}/ig, function (all, name) {
            return vars[name];
        });
        callback(null, out);
    });
}
487588
function Temper(options) {
  if (!this) return new Temper(options);
  options = options || {};

  //
  // We only want to cache the templates in production as it's so we can easily
  // change templates when we're developing.
  //
  options.cache = 'cache' in options
    ? options.cache
    : process.env.NODE_ENV !== 'production';

  this.installed = Object.create(null);   // Installed module for extension cache.
  this.required = Object.create(null);    // Template engine require cache.
  this.compiled = Object.create(null);    // Compiled template cache.
  this.timers = new TickTock(this);       // Keep track of timeouts.
  this.file = Object.create(null);        // File lookup cache.
  this.cache = options.cache;             // Cache compiled templates.
}
946946
function RoutePattern(options) {
    // The route string are compiled to a regexp (if it isn't already)
    this.pathPattern = options.pathPattern;
    this.queryStringPattern = options.queryStringPattern;
    this.hashPattern = options.hashPattern;

    // The original routestring (optional)
    this.routeString = options.routeString;
  }
1081615
function Loader(options) {
  options = options || {};
  this._nodeenv = options.nodeenv || process.env.NODE_ENV || 'development';
  this._path = options.path || '';
  this._name = options.name || Loader.DOT_BASE;
}
278993
function configureESLint(options) {
	const ESLintConfig = {
		rules: options.rules
	}

	ESLintConfig.extends = 'xo'
	if (options.esnext) {
		ESLintConfig.extends = 'xo/esnext'
	}

	if (!options.semicolon) {
		ESLintConfig.rules.semi = [2, 'never']
	}

	if (options.space === false) {
		ESLintConfig.rules.indent = [
			2, 'tab', {
				SwitchCase: 1
			}
		]
	} else {
		ESLintConfig.rules.indent = [
			2, parseInt(options.space, 10), {
				SwitchCase: 0
			}
		]
	}

	ESLintConfig.rules['valid-jsdoc'] = [0]
	ESLintConfig.rules['require-jsdoc'] = [0]

	console.debug(stripIndent`
		${clr.title}ESlint Options${clr.title.out}:
	`)
	if (console.canWrite(5)) {
		console.pretty(ESLintConfig, 2)
	}

	return () => new ESLint({
		baseConfig: ESLintConfig,
		fix: true,
		rules: options.rules
	})
}
254188
function (srcPath, options) {
        _.defaults(options || (options = {}), DEFAULT_OPTIONS);
        var separator = options.separator;

        var reg = new RegExp('^sprite' + separator + '.+@\\d+x\\.png$');
        return reg.test(path.basename(srcPath));
    }
468948
function FontpathRenderer(options) {
    if (!(this instanceof FontpathRenderer))
        return new FontpathRenderer(options)
    Base.call(this, options)

    this.data = {
        glyphs: [],
        underlines: []
    }
}
375598
def tempfile_path(content)
      tempfile = Tempfile.new('tty-editor')
      tempfile << content
      tempfile.flush
      unless tempfile.nil?
        tempfile.close
      end
      tempfile.path
    end
1301141
function createMiddleware(options, urlType) {
  /**
   * Express middleware handling html requests
   *
   * @param {Request} req Request object
   * @param {Response} res Response object
   * @param {callback} next next middleware in chain
   */
  return async (req, res, next) => {
    const { owner } = req.params;
    const repoName = req.params.repo;
    let refName = req.params.ref || 'master';
    let fpath = req.params[0] || '';

    const repPath = resolveRepositoryPath(options, owner, repoName);

    // issue: #53: handle branch names containing '/' (e.g. 'foo/bar')
    const parsed = await determineRefPathName(repPath, `${req.params.ref}/${req.params[0]}`);
    if (parsed) {
      refName = parsed.ref;
      fpath = parsed.pathName;
    }

    // issue #247: lenient handling of redundant leading slashes in path
    while (fpath.length && fpath[0] === '/') {
      // trim leading slash
      fpath = fpath.substr(1);
    }

    // set response content type
    res.header('Content-Type', 'text/html');

    resolveCommit(repPath, refName)
      .then(commitOid => git.readObject({ dir: repPath, oid: commitOid, filepath: fpath })
        .catch(() => null))
      .then((blobOrTree) => {
        if (!blobOrTree) {
          if (!fpath.length && urlType === 'tree') {
            // 'tree' view
            res.send(`<!DOCTYPE html><html><body>owner: ${escape(owner)}<br>repo: ${escape(repoName)}<br>ref: ${escape(refName)}<p>tree view not implemented yet.</body></html>`);
          } else {
            res.status(404).send(`not found: ${escape(fpath)}`);
          }
          return;
        }

        const { type } = blobOrTree;
        if (!fpath.length && type === 'tree' && urlType === 'root') {
          // 'root' view
          res.send(`<!DOCTYPE html><html><body>owner: ${escape(owner)}<br>repo: ${escape(repoName)}<br>ref: ${escape(refName)}<p>root view not implemented yet.</body></html>`);
        } else if (type === 'tree' && urlType === 'tree') {
          // directory view
          res.send(`<!DOCTYPE html><html><body>owner: ${escape(owner)}<br>repo: ${escape(repoName)}<br>ref: ${escape(refName)}<br>path: ${escape(fpath)}<p>directory view not implemented yet.</body></html>`);
        } else if (type === 'blob' && urlType === 'blob') {
          // single file view
          res.send(`<!DOCTYPE html><html><body>owner: ${escape(owner)}<br>repo: ${escape(repoName)}<br>ref: ${escape(refName)}<br>path: ${escape(fpath)}<p>file view not implemented yet.</body></html>`);
        } else {
          res.status(404).send(`not found: ${escape(fpath)}`);
        }
      })
      .catch((err) => {
        options.logger.debug(`[htmlHandler] code: ${err.code} message: ${err.message} stack: ${err.stack}`);
        next(err);
      });
  };
}