UNPKG

mrkdown

Version:

Markdown files to HTML static site generator - angular.js app

23 lines (22 loc) 1.07 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.FileInfo = void 0; var path_1 = __importDefault(require("path")); var FileInfo = /** @class */ (function () { function FileInfo(value) { this.filePath = value; this.id = "id-" + value.replace(/\W/g, '-').toLowerCase(); this.templateUrl = value.replace(/\\/g, '/').replace(/(.md|.txt|.htm|.html)/g, '.html'); this.url = value.replace(/\\/g, '/').replace(/(.md|.txt)/g, '.html').replace(/-/g, '-').replace(/\s/g, '-').toLowerCase(); this.menuName = path_1.default.basename(value, path_1.default.extname(value)); this.controlName = "ctrl" + value.replace(/\W/g, "").toLowerCase(); this.folderStructureName = value.replace(/\\/g, ' > ').replace(/(.md|.txt|.htm|.html)/g, '.html'); this.code = ''; this.codeCount = 0; } return FileInfo; }()); exports.FileInfo = FileInfo;