UNPKG

@taiga-ui/cdk

Version:

Base library for creating Angular components and applications using Taiga UI principles regarding of actual visual appearance

11 lines 564 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addStyleComments = addStyleComments; const style_comments_1 = require("../constants/style-comments"); function addStyleComments(fileContent) { return Object.entries(style_comments_1.STYLE_COMMENTS).reduce((text, [entity, comment]) => { const wordRegex = new RegExp(String.raw `(^|\n)(?=[^\n]*${entity}\b)`, 'g'); return text.replaceAll(wordRegex, `$1// TODO: (Taiga UI migration) ${comment}\n`); }, fileContent); } //# sourceMappingURL=add-comments.js.map