UNPKG

liquid-node

Version:

Node.js port of Tobias Lütke's Liquid template engine.

55 lines (45 loc) 1.29 kB
// Generated by CoffeeScript 1.10.0 (function() { var Tag, slice = [].slice; module.exports = Tag = (function() { function Tag(template, tagName, markup) { this.template = template; this.tagName = tagName; this.markup = markup; } Tag.prototype.parseWithCallbacks = function() { var args, parse; args = 1 <= arguments.length ? slice.call(arguments, 0) : []; if (this.afterParse) { parse = (function(_this) { return function() { return _this.parse.apply(_this, args).then(function() { return _this.afterParse.apply(_this, args); }); }; })(this); } else { parse = (function(_this) { return function() { return _this.parse.apply(_this, args); }; })(this); } if (this.beforeParse) { return Promise.resolve(this.beforeParse.apply(this, args)).then(parse); } else { return parse(); } }; Tag.prototype.parse = function() {}; Tag.prototype.name = function() { return this.constructor.name.toLowerCase(); }; Tag.prototype.render = function() { return ""; }; return Tag; })(); }).call(this); //# sourceMappingURL=tag.js.map