UNPKG

teacup-yoppet

Version:

Render HTML with native CoffeeScript templates. No magic, no fuss. Teacup Yoppet

33 lines (28 loc) 902 B
// Generated by CoffeeScript 1.12.7 (function() { var connectAssets, teacup; connectAssets = require('connect-assets'); teacup = require('..'); module.exports = function(options) { var connectMiddleware, helperContext, raw, renderable; if (options == null) { options = {}; } options.helperContext = helperContext = {}; connectMiddleware = connectAssets(options); if (options.jsDir != null) { helperContext.js.root = options.jsDir; } if (options.cssDir != null) { helperContext.css.root = options.cssDir; } renderable = teacup.renderable, raw = teacup.raw; teacup.js = renderable(function(path, options) { return raw(helperContext.js(path, options)); }); teacup.css = renderable(function(path, options) { return raw(helperContext.css(path, options)); }); return connectMiddleware; }; }).call(this);