UNPKG

md-toy-blog

Version:

Very simple Markdown blog: serves your md as html without fancy databases. You will only spend time writing the actual data.

20 lines (19 loc) 722 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var ViewNameService = /** @class */ (function () { function ViewNameService(config) { this.config = config; } ViewNameService.prototype.getViewBaseName = function (controller) { var fullName = controller.constructor.name; return fullName .substring(0, fullName.length - 'Controller'.length) .toLowerCase(); }; ViewNameService.prototype.getViewPath = function (viewBaseName, action) { var filepath = this.config.viewsPath + "/" + viewBaseName + "-" + action + ".html"; return filepath; }; return ViewNameService; }()); exports.default = ViewNameService;