chocola 1.5.0 → 1.5.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.
Files changed (2) hide show
  1. package/README.md +10 -6
  2. package/package.json +7 -4
package/README.md CHANGED
@@ -12,25 +12,29 @@ Chocola is a JavaScript library for creating web user interfaces.
12
12
  <button title={title}>{text}</button>
13
13
 
14
14
  <div class="main">
15
- <div class="number">${count}</div>
15
+ <div class="number">{count}</div>
16
16
  </div>
17
17
  </div>
18
18
  ```
19
19
 
20
20
  ```js
21
- import HTML from "./html/counter.html";
22
- import CSS from "./css/counter.css";
21
+ import body from "./html/counter.html";
22
+ import styles from "./css/counter.css";
23
23
 
24
24
  function RUNTIME(self, ctx) {
25
- self.querySelector("button").addEventListener("click", () => {
25
+ const btn = self.querySelector("button");
26
+ const number = self.querySelector(".number");
27
+
28
+ btn.addEventListener("click", () => {
26
29
  ctx.count++;
30
+ number.textContent = ctx.count;
27
31
  })
28
32
  }
29
33
 
30
34
  export default function Counter() {
31
35
  return {
32
- body: HTML,
33
- styles: CSS,
36
+ body,
37
+ styles,
34
38
  script: RUNTIME
35
39
  }
36
40
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "chocola",
3
- "version": "1.5.0",
4
- "description": "The sweetest way to build reactive web apps",
3
+ "version": "1.5.2",
4
+ "description": "The sweetest way to build the web",
5
5
  "keywords": [
6
6
  "web",
7
7
  "app",
@@ -11,7 +11,7 @@
11
11
  "components",
12
12
  "ui"
13
13
  ],
14
- "homepage": "https://github.com/sad-gabi/chocola#readme",
14
+ "homepage": "https://chocolaframework.web.app/",
15
15
  "bugs": {
16
16
  "url": "https://github.com/sad-gabi/chocola/issues"
17
17
  },
@@ -23,6 +23,10 @@
23
23
  "author": "SadGabi",
24
24
  "type": "module",
25
25
  "main": "index.js",
26
+ "funding": {
27
+ "type": "github",
28
+ "url": "https://github.com/sponsors/sad-gabi"
29
+ },
26
30
  "scripts": {
27
31
  "test": "echo \"Error: no test specified\" && exit 1"
28
32
  },
@@ -32,7 +36,6 @@
32
36
  },
33
37
  "dependencies": {
34
38
  "chalk": "^5.6.2",
35
- "chocola": "file:chocola-1.4.2.tgz",
36
39
  "js-beautify": "^1.15.4",
37
40
  "jsdom": "^27.4.0"
38
41
  },