chocola 2.0.0-next.1 → 2.0.0-next.4
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/README.md +32 -45
- package/compiler/component-processor.js +292 -249
- package/compiler/config.js +1 -54
- package/compiler/dom-processor.js +3 -53
- package/compiler/fs.js +0 -11
- package/compiler/index.js +16 -36
- package/compiler/pipeline.js +7 -188
- package/compiler/runtime-generator.js +0 -6
- package/compiler/utils.js +17 -99
- package/dev/index.js +1 -7
- package/package.json +2 -3
- package/utils.js +0 -5
package/README.md
CHANGED
|
@@ -1,45 +1,32 @@
|
|
|
1
|
-
# chocola
|
|
2
|
-
|
|
3
|
-
Chocola is a JavaScript library for creating web user interfaces.
|
|
4
|
-
|
|
5
|
-
`chocola` only contains the functionality to build and serve web static builds. For production you may want to implement `chocola` to your workflow with other frameworks as Vite until official workflows are provided.
|
|
6
|
-
|
|
7
|
-
## Usage
|
|
8
|
-
|
|
9
|
-
```html
|
|
10
|
-
<!--
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export default function Counter() {
|
|
35
|
-
return {
|
|
36
|
-
body,
|
|
37
|
-
styles,
|
|
38
|
-
script: RUNTIME
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Documentation
|
|
44
|
-
|
|
45
|
-
See https://github.com/sad-gabi/chocola/wiki
|
|
1
|
+
# chocola
|
|
2
|
+
|
|
3
|
+
Chocola is a JavaScript library for creating web user interfaces.
|
|
4
|
+
|
|
5
|
+
`chocola` only contains the functionality to build and serve web static builds. For production you may want to implement `chocola` to your workflow with other frameworks as Vite until official workflows are provided.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<!-- MyTitle.html -->
|
|
11
|
+
<script>
|
|
12
|
+
let self = new HTMLElement;
|
|
13
|
+
|
|
14
|
+
export let title = "Default title";
|
|
15
|
+
|
|
16
|
+
function $runtime() {
|
|
17
|
+
console.log("Component mounted:", self)
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<h1>{title}</h1>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<style>
|
|
26
|
+
button { color: chocolate; }
|
|
27
|
+
</style>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Documentation
|
|
31
|
+
|
|
32
|
+
See https://github.com/sad-gabi/chocola/wiki
|