|
|
// Generated by CoffeeScript 1.6.3
var Backbone, DocPad, createInstance, createMiddlewareInstance, pathUtil, queryEngine, _ref;
pathUtil = require('path');
_ref = require(__dirname + '/lib/docpad'), DocPad = _ref.DocPad, queryEngine = _ref.queryEngine, Backbone = _ref.Backbone, createInstance = _ref.createInstance, createMiddlewareInstance = _ref.createMiddlewareInstance;
module.exports = { DocPad: DocPad, queryEngine: queryEngine, Backbone: Backbone, createInstance: createInstance, createMiddlewareInstance: createMiddlewareInstance, require: function(relativePath) { var absolutePath, err; absolutePath = pathUtil.normalize(pathUtil.join(__dirname, relativePath)); if (absolutePath.replace(__dirname, '') === absolutePath) { throw new Error("docpad.require is limited to local docpad files only: " + relativePath); } try { require.resolve(absolutePath); } catch (_error) { err = _error; absolutePath = pathUtil.join(__dirname, 'lib', relativePath); require.resolve(absolutePath); } return require(absolutePath); } };
|