chocola 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/renderer.js +6 -1
- package/package.json +3 -2
package/core/renderer.js
CHANGED
|
@@ -2,9 +2,14 @@ import { renderComponents } from './componentLoader.js';
|
|
|
2
2
|
|
|
3
3
|
export async function renderView(viewModule) {
|
|
4
4
|
const view = (await viewModule()).default();
|
|
5
|
+
|
|
5
6
|
document.title = view.title;
|
|
6
7
|
let html = view.html;
|
|
7
8
|
html = renderComponents(html);
|
|
9
|
+
|
|
8
10
|
document.querySelector('#app').innerHTML = html;
|
|
9
|
-
|
|
11
|
+
|
|
12
|
+
for (const script of view.scripts || []) {
|
|
13
|
+
await script();
|
|
14
|
+
}
|
|
10
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chocola",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "A framework for creating user interfaces.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"author": "SadGabi <sadgabi20@gmail.com>",
|
|
18
18
|
"license": "GPL-3.0-or-later",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"
|
|
20
|
+
"create-chocola-app": "1.0.1",
|
|
21
|
+
"vite": "^7.1.1"
|
|
21
22
|
},
|
|
22
23
|
"repository": {
|
|
23
24
|
"type": "git",
|