You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
331 B
JavaScript

"use strict";
var path = require("path");
var fileUrl = require("file-url");
module.exports = function (viewDirectory, options) {
return function (viewPath) {
var fullPath = path.join(viewDirectory, viewPath);
if (options.extension != null) {
fullPath += "." + options.extension;
}
return fileUrl(fullPath);
};
};