fix(core): Updated dependencies and optimized code structure

This commit is contained in:
2024-10-13 12:12:35 +02:00
parent 8872a92193
commit ef65d08a54
8 changed files with 912 additions and 945 deletions

17
ts/classes.smartntml.ts Normal file
View File

@@ -0,0 +1,17 @@
import * as plugins from './smartntml.plugins.js';
export class Smartntml {
constructor() {}
public async renderTemplateResult(
templateResult: plugins.deesElement.TemplateResult,
stripCommentsArg = true
) {
const element = document.createElement('div');
plugins.deesElement.render(templateResult, element);
let stringResult = element.innerHTML;
if (stripCommentsArg) {
stringResult = stringResult.replace(/<!--(.*?)-->/g, '');
}
return stringResult;
}
}