Compare commits
No commits in common. "master" and "v2.0.5" have entirely different histories.
31
changelog.md
31
changelog.md
@ -1,31 +0,0 @@
|
|||||||
# Changelog
|
|
||||||
|
|
||||||
## 2024-10-13 - 2.0.8 - fix(core)
|
|
||||||
Updated dependencies and optimized code structure
|
|
||||||
|
|
||||||
- Upgraded '@git.zone/tsbuild', '@git.zone/tsrun', '@design.estate/dees-element', and '@happy-dom/global-registrator' packages to their latest versions.
|
|
||||||
- Removed 'why-is-node-running' from devDependencies as it is not used.
|
|
||||||
- Refactored Smartntml class to separate file for better module organization.
|
|
||||||
|
|
||||||
## 2024-05-28 - 2.0.4 to 2.0.7 - fix and maintenance updates
|
|
||||||
Minor updates and fixes to the core functionality.
|
|
||||||
|
|
||||||
- fixed various core updates
|
|
||||||
- updated description in version 2.0.7
|
|
||||||
|
|
||||||
## 2023-05-01 - 2.0.0 to 2.0.4 - updates and fixes
|
|
||||||
Introduction of new organization schemes and updates.
|
|
||||||
|
|
||||||
- switched to new organization scheme
|
|
||||||
- fixed core updates throughout versions
|
|
||||||
|
|
||||||
## 2023-03-30 - 1.0.12 to 2.0.0 - major and breaking changes
|
|
||||||
Significant version upgrade with breaking changes for environment handling.
|
|
||||||
|
|
||||||
- improved loading of the environment allowing use in synchronization environments
|
|
||||||
- fixed core updates in version 2.0.0
|
|
||||||
|
|
||||||
## 2022-05-28 - 1.0.1 to 1.0.12 - initial fixes
|
|
||||||
Initial series of updates focusing on core functionality improvements.
|
|
||||||
|
|
||||||
- fixed core updates consistently across versions
|
|
26
package.json
26
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@push.rocks/smartntml",
|
"name": "@push.rocks/smartntml",
|
||||||
"version": "2.0.8",
|
"version": "2.0.5",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "Provides lit-html rendering capabilities for backend applications.",
|
"description": "Provides lit-html rendering capabilities for backend applications.",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
@ -10,22 +10,23 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/ --web)",
|
"test": "(tstest test/ --web)",
|
||||||
"build": "(tsbuild --web --allowimplicitany)",
|
"build": "(tsbuild --web)",
|
||||||
"buildDocs": "tsdoc"
|
"buildDocs": "tsdoc"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@git.zone/tsbuild": "^2.1.84",
|
"@git.zone/tsbuild": "^2.1.65",
|
||||||
"@git.zone/tsbundle": "^2.0.7",
|
"@git.zone/tsbundle": "^2.0.7",
|
||||||
"@git.zone/tsrun": "^1.2.49",
|
"@git.zone/tsrun": "^1.2.39",
|
||||||
"@git.zone/tstest": "^1.0.73",
|
"@git.zone/tstest": "^1.0.73",
|
||||||
"@push.rocks/tapbundle": "^5.3.0",
|
"@push.rocks/tapbundle": "^5.0.4",
|
||||||
"@types/node": "^22.7.5"
|
"@types/node": "^18.7.23",
|
||||||
|
"why-is-node-running": "^2.2.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@design.estate/dees-element": "^2.0.39",
|
"@design.estate/dees-element": "^2.0.20",
|
||||||
"@happy-dom/global-registrator": "^15.7.4",
|
"@happy-dom/global-registrator": "^8.9.0",
|
||||||
"@push.rocks/smartpromise": "^4.0.3",
|
"@push.rocks/smartpromise": "^4.0.3",
|
||||||
"fake-indexeddb": "^6.0.0"
|
"fake-indexeddb": "^4.0.1"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 1 chrome versions"
|
"last 1 chrome versions"
|
||||||
@ -52,10 +53,5 @@
|
|||||||
"happy-dom",
|
"happy-dom",
|
||||||
"indexeddb",
|
"indexeddb",
|
||||||
"typescript"
|
"typescript"
|
||||||
],
|
]
|
||||||
"homepage": "https://code.foss.global/push.rocks/smartntml",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://code.foss.global/push.rocks/smartntml.git"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
1806
pnpm-lock.yaml
generated
1806
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,4 @@
|
|||||||
|
import log from 'why-is-node-running';
|
||||||
import { expect, expectAsync, tap } from '@push.rocks/tapbundle';
|
import { expect, expectAsync, tap } from '@push.rocks/tapbundle';
|
||||||
import * as smartntml from '../ts/index.js';
|
import * as smartntml from '../ts/index.js';
|
||||||
|
|
||||||
@ -18,6 +19,7 @@ tap.test('should render a string', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should log', async () => {
|
tap.test('should log', async () => {
|
||||||
|
log();
|
||||||
setTimeout(() => process.exit(0), 0);
|
setTimeout(() => process.exit(0), 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* autocreated commitinfo by @push.rocks/commitinfo
|
* autocreated commitinfo by @pushrocks/commitinfo
|
||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartntml',
|
name: '@push.rocks/smartntml',
|
||||||
version: '2.0.8',
|
version: '2.0.5',
|
||||||
description: 'Provides lit-html rendering capabilities for backend applications.'
|
description: 'Provides lit-html rendering capabilities for backend applications.'
|
||||||
}
|
}
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
20
ts/index.ts
20
ts/index.ts
@ -1,8 +1,22 @@
|
|||||||
// @ts-ignore
|
|
||||||
import './instrument/happydom.js';
|
import './instrument/happydom.js';
|
||||||
import { Smartntml } from './classes.smartntml.js';
|
import * as plugins from './smartntml.plugins.js';
|
||||||
export { Smartntml };
|
|
||||||
import * as deesElement from '@design.estate/dees-element';
|
import * as deesElement from '@design.estate/dees-element';
|
||||||
export { deesElement };
|
export { deesElement };
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
// first lets setup indexeddb
|
// first lets setup indexeddb
|
||||||
import 'fake-indexeddb/auto';
|
import 'fake-indexeddb/auto';
|
||||||
|
|
||||||
// @ts-nocheck
|
|
||||||
import { GlobalRegistrator } from '@happy-dom/global-registrator';
|
import { GlobalRegistrator } from '@happy-dom/global-registrator';
|
||||||
GlobalRegistrator.register();
|
GlobalRegistrator.register();
|
||||||
window.location.href = 'http://localhost';
|
window.location.href = 'http://localhost';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user