1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 1 1 1 1 1 12 12 1 12 53 | var send = require('./send'); var cachedCompile = require('./compile'); var normalize = require('./settings').normalize; module.exports = directory; function directory(path, options) { options = normalize(options); if (options.precompile) { cachedCompile(path, options, function () {}); } return function (req, res, next) { send(path, options, req, res, next); }; } |