UNPKG

ocat-lang

Version:

A programming language for the web design and development

15 lines (14 loc) 637 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.processBasicWC = exports.processBasic = void 0; const constants_1 = require("../constants"); const processBasic = (html, config) => (0, exports.processBasicWC)(html).replace(/{\*routes\*}/g, config.routeTemplate); exports.processBasic = processBasic; const processBasicWC = (html) => html.replace(/\{\s*(\w+)([^}]*)\s*\}/g, (_match, getter) => { switch (getter) { case 'generator': return constants_1.generator; case 'head': return constants_1.defhead; default: return ''; } }); exports.processBasicWC = processBasicWC;