How to use the ejs.EjsScanner function in ejs

To help you get started, we’ve selected a few ejs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nrstott / bogart / lib / bogart-ejs.js View on Github external
var EjsScanner = require("ejs").EjsScanner;
var EjsView = require("ejs").EjsView;
var EJS = require("ejs").EJS;
var util = require("util");
var fs = require("file");
var Request = require("jack").Request;

exports.FileSystemTemplateLocator = function(options){
    options = options || {};

    this.layoutsPath = options.layoutsPath || "layouts/";
    this.viewsPath = options.viewsPath || "/";
    this.sharedPath = options.sharedPath || "shared/";
    this.cacheViews = options.cacheViews || true;

    var rootPath = fs.path(system.env["BOGART_ROOT"] || fs.path(require.main).dirname()) + "/views/";
    var cache = {
github nrstott / bogart / lib / bogart / plugin / ejs / ejs_layout_renderer.js View on Github external
var EjsScanner = require("ejs").EjsScanner;
var EjsView = require("ejs").EjsView;
var EJS = require("ejs").EJS;
var util = require("util");
var fs = require("file");
var Request = require("jack").Request;

/**
 * Finds EJS templates in the file system.
 *
 * @param options Accepts the following options:
 * layoutsPath: root directory in which to find layouts.  Defaults to $BOGART_ROOT/layouts
 * viewsPath: root directory in which to find views.  Defaults to $BOGART_ROOT
 * sharedPath: root directory in which to find shared views.  Defaults to $BOGART_ROOT/shared
 */
exports.FileSystemTemplateLocator = function(options){
    var log;