jac-client 0.2.10__py3-none-any.whl → 0.2.12__py3-none-any.whl
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.
- jac_client/examples/all-in-one/button.jac +4 -3
- jac_client/examples/all-in-one/components/CategoryFilter.jac +36 -24
- jac_client/examples/all-in-one/components/Header.jac +12 -8
- jac_client/examples/all-in-one/components/ProfitOverview.jac +49 -35
- jac_client/examples/all-in-one/components/Summary.jac +59 -36
- jac_client/examples/all-in-one/components/TransactionForm.jac +142 -112
- jac_client/examples/all-in-one/components/TransactionItem.jac +37 -30
- jac_client/examples/all-in-one/components/TransactionList.jac +33 -26
- jac_client/examples/all-in-one/components/button.jac +4 -3
- jac_client/examples/all-in-one/components/navigation.jac +111 -117
- jac_client/examples/all-in-one/constants/categories.jac +23 -24
- jac_client/examples/all-in-one/constants/clients.jac +7 -8
- jac_client/examples/all-in-one/context/BudgetContext.jac +9 -6
- jac_client/examples/all-in-one/hooks/useBudget.jac +18 -12
- jac_client/examples/all-in-one/hooks/useLocalStorage.jac +14 -13
- jac_client/examples/all-in-one/main.jac +340 -371
- jac_client/examples/all-in-one/pages/BudgetPlanner.jac +19 -12
- jac_client/examples/all-in-one/pages/FeaturesTest.jac +31 -15
- jac_client/examples/all-in-one/pages/LandingPage.jac +113 -90
- jac_client/examples/all-in-one/pages/budget_planner_ui.cl.jac +34 -39
- jac_client/examples/all-in-one/pages/features_test_ui.cl.jac +464 -352
- jac_client/examples/all-in-one/pages/loginPage.jac +114 -119
- jac_client/examples/all-in-one/pages/nestedDemo.jac +43 -50
- jac_client/examples/all-in-one/pages/notFound.jac +14 -15
- jac_client/examples/all-in-one/pages/signupPage.jac +113 -119
- jac_client/examples/all-in-one/utils/formatters.jac +5 -8
- jac_client/examples/asset-serving/css-with-image/main.jac +77 -73
- jac_client/examples/asset-serving/image-asset/main.jac +47 -46
- jac_client/examples/asset-serving/import-alias/main.jac +93 -95
- jac_client/examples/basic/main.jac +17 -15
- jac_client/examples/basic-auth/main.jac +246 -254
- jac_client/examples/basic-auth-with-router/main.jac +272 -285
- jac_client/examples/basic-full-stack/main.jac +245 -242
- jac_client/examples/css-styling/js-styling/main.jac +41 -62
- jac_client/examples/css-styling/material-ui/main.jac +90 -90
- jac_client/examples/css-styling/pure-css/main.jac +35 -44
- jac_client/examples/css-styling/sass-example/main.jac +35 -44
- jac_client/examples/css-styling/styled-components/main.jac +38 -47
- jac_client/examples/css-styling/tailwind-example/main.jac +54 -43
- jac_client/examples/full-stack-with-auth/main.jac +407 -433
- jac_client/examples/little-x/main.jac +306 -344
- jac_client/examples/little-x/src/submit-button.jac +15 -14
- jac_client/examples/nested-folders/nested-advance/main.jac +18 -27
- jac_client/examples/nested-folders/nested-advance/src/ButtonRoot.jac +4 -6
- jac_client/examples/nested-folders/nested-advance/src/level1/ButtonSecondL.jac +9 -13
- jac_client/examples/nested-folders/nested-advance/src/level1/Card.jac +29 -32
- jac_client/examples/nested-folders/nested-advance/src/level1/level2/ButtonThirdL.jac +12 -18
- jac_client/examples/nested-folders/nested-basic/main.jac +7 -5
- jac_client/examples/nested-folders/nested-basic/src/button.jac +4 -3
- jac_client/examples/nested-folders/nested-basic/src/components/button.jac +4 -3
- jac_client/examples/ts-support/main.jac +26 -26
- jac_client/examples/with-router/main.jac +186 -223
- jac_client/plugin/client_runtime.cl.jac +5 -3
- jac_client/plugin/impl/client_runtime.impl.jac +1 -1
- jac_client/plugin/plugin_config.jac +53 -99
- jac_client/plugin/src/__init__.jac +0 -2
- jac_client/plugin/src/compiler.jac +0 -1
- jac_client/plugin/src/impl/compiler.impl.jac +49 -17
- jac_client/plugin/src/impl/jac_to_js.impl.jac +5 -1
- jac_client/plugin/src/impl/package_installer.impl.jac +20 -20
- jac_client/plugin/src/impl/vite_bundler.impl.jac +146 -84
- jac_client/plugin/src/targets/impl/desktop_target.impl.jac +54 -41
- jac_client/plugin/utils/__init__.jac +3 -0
- jac_client/plugin/utils/bun_installer.jac +16 -0
- jac_client/plugin/utils/client_deps.jac +14 -0
- jac_client/plugin/utils/impl/bun_installer.impl.jac +99 -0
- jac_client/plugin/utils/impl/client_deps.impl.jac +73 -0
- jac_client/templates/client.jacpack +0 -4
- jac_client/templates/fullstack.jacpack +1 -5
- jac_client/tests/conftest.py +56 -41
- jac_client/tests/fixtures/spawn_test/app.jac +49 -52
- jac_client/tests/fixtures/with-ts/app.jac +27 -27
- jac_client/tests/test_cli.py +71 -6
- jac_client/tests/test_helpers.py +11 -18
- jac_client/tests/test_it.py +1 -1
- {jac_client-0.2.10.dist-info → jac_client-0.2.12.dist-info}/METADATA +5 -5
- jac_client-0.2.12.dist-info/RECORD +115 -0
- {jac_client-0.2.10.dist-info → jac_client-0.2.12.dist-info}/WHEEL +1 -1
- jac_client/plugin/src/babel_processor.jac +0 -18
- jac_client/plugin/src/impl/babel_processor.impl.jac +0 -89
- jac_client/plugin/utils/impl/node_installer.impl.jac +0 -249
- jac_client/plugin/utils/node_installer.jac +0 -41
- jac_client-0.2.10.dist-info/RECORD +0 -115
- {jac_client-0.2.10.dist-info → jac_client-0.2.12.dist-info}/entry_points.txt +0 -0
- {jac_client-0.2.10.dist-info → jac_client-0.2.12.dist-info}/top_level.txt +0 -0
|
@@ -1,88 +1,92 @@
|
|
|
1
1
|
# Pages
|
|
2
|
-
cl import from react { useEffect }
|
|
3
2
|
cl import ".styles.css";
|
|
4
3
|
|
|
5
4
|
cl {
|
|
6
5
|
def:pub app -> any {
|
|
7
6
|
has count: int = 0;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
>
|
|
16
|
-
<h1>
|
|
17
|
-
🍔 Burger Counter App
|
|
18
|
-
</h1>
|
|
19
|
-
<img
|
|
20
|
-
src="/static/assets/burger.png"
|
|
21
|
-
alt="Delicious Burger"
|
|
22
|
-
style={{
|
|
23
|
-
width: "200px",
|
|
24
|
-
height: "auto",
|
|
25
|
-
margin: "20px 0",
|
|
26
|
-
borderRadius: "10px",
|
|
27
|
-
boxShadow: "0 4px 8px rgba(0,0,0,0.2)"
|
|
28
|
-
}}
|
|
29
|
-
/>
|
|
30
|
-
<p
|
|
31
|
-
style={{fontSize: "18px", margin: "20px 0"}}
|
|
32
|
-
>
|
|
33
|
-
You've clicked the burger
|
|
34
|
-
<strong>
|
|
35
|
-
{count}
|
|
36
|
-
</strong>
|
|
37
|
-
times!
|
|
38
|
-
</p>
|
|
39
|
-
<button
|
|
40
|
-
onClick={lambda e: any -> None{ count = count + 1;} }
|
|
7
|
+
|
|
8
|
+
can with count entry {
|
|
9
|
+
console.log("Count: ", count);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return
|
|
13
|
+
<div
|
|
41
14
|
style={{
|
|
42
|
-
padding: "
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
color: "white",
|
|
46
|
-
border: "none",
|
|
47
|
-
borderRadius: "5px",
|
|
48
|
-
cursor: "pointer",
|
|
49
|
-
boxShadow: "0 2px 4px rgba(0,0,0,0.2)"
|
|
15
|
+
padding: "20px",
|
|
16
|
+
textAlign: "center",
|
|
17
|
+
fontFamily: "Arial, sans-serif"
|
|
50
18
|
}}
|
|
51
19
|
>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
style={{marginTop: "40px", marginBottom: "20px"}}
|
|
56
|
-
>
|
|
57
|
-
CSS Asset Examples
|
|
58
|
-
</h2>
|
|
59
|
-
<div className="container">
|
|
60
|
-
<h3
|
|
61
|
-
style={{color: "white", textShadow: "2px 2px 4px rgba(0,0,0,0.5)"}}
|
|
62
|
-
>
|
|
63
|
-
Background Image Example
|
|
64
|
-
</h3>
|
|
65
|
-
<p
|
|
66
|
-
style={{color: "white", textShadow: "2px 2px 4px rgba(0,0,0,0.5)"}}
|
|
67
|
-
>
|
|
68
|
-
This container uses the burger image as a background via CSS
|
|
69
|
-
</p>
|
|
70
|
-
</div>
|
|
71
|
-
<div className="card">
|
|
72
|
-
<h3>
|
|
73
|
-
Image in Card
|
|
74
|
-
</h3>
|
|
20
|
+
<h1>
|
|
21
|
+
🍔 Burger Counter App
|
|
22
|
+
</h1>
|
|
75
23
|
<img
|
|
76
24
|
src="/static/assets/burger.png"
|
|
77
|
-
alt="Burger
|
|
78
|
-
|
|
25
|
+
alt="Delicious Burger"
|
|
26
|
+
style={{
|
|
27
|
+
width: "200px",
|
|
28
|
+
height: "auto",
|
|
29
|
+
margin: "20px 0",
|
|
30
|
+
borderRadius: "10px",
|
|
31
|
+
boxShadow: "0 4px 8px rgba(0,0,0,0.2)"
|
|
32
|
+
}}
|
|
79
33
|
/>
|
|
80
|
-
<p
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
34
|
+
<p style={{fontSize: "18px", margin: "20px 0"}}>
|
|
35
|
+
You've clicked the burger
|
|
36
|
+
<strong>
|
|
37
|
+
{count}
|
|
38
|
+
</strong>
|
|
39
|
+
times!
|
|
84
40
|
</p>
|
|
85
|
-
|
|
86
|
-
|
|
41
|
+
<button
|
|
42
|
+
onClick={lambda e: any -> None { count = count + 1;}}
|
|
43
|
+
style={{
|
|
44
|
+
padding: "10px 20px",
|
|
45
|
+
fontSize: "16px",
|
|
46
|
+
backgroundColor: "#ff6b35",
|
|
47
|
+
color: "white",
|
|
48
|
+
border: "none",
|
|
49
|
+
borderRadius: "5px",
|
|
50
|
+
cursor: "pointer",
|
|
51
|
+
boxShadow: "0 2px 4px rgba(0,0,0,0.2)"
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
Click the Burger! 🍔
|
|
55
|
+
</button>
|
|
56
|
+
<h2 style={{marginTop: "40px", marginBottom: "20px"}}>
|
|
57
|
+
CSS Asset Examples
|
|
58
|
+
</h2>
|
|
59
|
+
<div className="container">
|
|
60
|
+
<h3
|
|
61
|
+
style={{
|
|
62
|
+
color: "white",
|
|
63
|
+
textShadow: "2px 2px 4px rgba(0,0,0,0.5)"
|
|
64
|
+
}}
|
|
65
|
+
>
|
|
66
|
+
Background Image Example
|
|
67
|
+
</h3>
|
|
68
|
+
<p
|
|
69
|
+
style={{
|
|
70
|
+
color: "white",
|
|
71
|
+
textShadow: "2px 2px 4px rgba(0,0,0,0.5)"
|
|
72
|
+
}}
|
|
73
|
+
>
|
|
74
|
+
This container uses the burger image as a background via CSS
|
|
75
|
+
</p>
|
|
76
|
+
</div>
|
|
77
|
+
<div className="card">
|
|
78
|
+
<h3>
|
|
79
|
+
Image in Card
|
|
80
|
+
</h3>
|
|
81
|
+
<img
|
|
82
|
+
src="/static/assets/burger.png"
|
|
83
|
+
alt="Burger in Card"
|
|
84
|
+
className="burgerImage"
|
|
85
|
+
/>
|
|
86
|
+
<p style={{marginTop: "15px", color: "#666"}}>
|
|
87
|
+
This image is displayed within a styled card using CSS classes
|
|
88
|
+
</p>
|
|
89
|
+
</div>
|
|
90
|
+
</div>;
|
|
87
91
|
}
|
|
88
92
|
}
|
|
@@ -1,55 +1,56 @@
|
|
|
1
1
|
# Pages
|
|
2
|
-
cl import from react { useEffect }
|
|
3
|
-
|
|
4
2
|
cl {
|
|
5
3
|
def:pub app -> any {
|
|
6
4
|
has count: int = 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
>
|
|
15
|
-
<h1>
|
|
16
|
-
🍔 Burger Counter App
|
|
17
|
-
</h1>
|
|
18
|
-
<img
|
|
19
|
-
src="/static/assets/burger.png"
|
|
20
|
-
alt="Delicious Burger"
|
|
21
|
-
style={{
|
|
22
|
-
width: "200px",
|
|
23
|
-
height: "auto",
|
|
24
|
-
margin: "20px 0",
|
|
25
|
-
borderRadius: "10px",
|
|
26
|
-
boxShadow: "0 4px 8px rgba(0,0,0,0.2)"
|
|
27
|
-
}}
|
|
28
|
-
/>
|
|
29
|
-
<p
|
|
30
|
-
style={{fontSize: "18px", margin: "20px 0"}}
|
|
31
|
-
>
|
|
32
|
-
You've clicked the burger
|
|
33
|
-
<strong>
|
|
34
|
-
{count}
|
|
35
|
-
</strong>
|
|
36
|
-
times!
|
|
37
|
-
</p>
|
|
38
|
-
<button
|
|
39
|
-
onClick={lambda e: any -> None{ count = count + 1;} }
|
|
5
|
+
|
|
6
|
+
can with count entry {
|
|
7
|
+
console.log("Count: ", count);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return
|
|
11
|
+
<div
|
|
40
12
|
style={{
|
|
41
|
-
padding: "
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
color: "white",
|
|
45
|
-
border: "none",
|
|
46
|
-
borderRadius: "5px",
|
|
47
|
-
cursor: "pointer",
|
|
48
|
-
boxShadow: "0 2px 4px rgba(0,0,0,0.2)"
|
|
13
|
+
padding: "20px",
|
|
14
|
+
textAlign: "center",
|
|
15
|
+
fontFamily: "Arial, sans-serif"
|
|
49
16
|
}}
|
|
50
17
|
>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
18
|
+
<h1>
|
|
19
|
+
🍔 Burger Counter App
|
|
20
|
+
</h1>
|
|
21
|
+
<img
|
|
22
|
+
src="/static/assets/burger.png"
|
|
23
|
+
alt="Delicious Burger"
|
|
24
|
+
style={{
|
|
25
|
+
width: "200px",
|
|
26
|
+
height: "auto",
|
|
27
|
+
margin: "20px 0",
|
|
28
|
+
borderRadius: "10px",
|
|
29
|
+
boxShadow: "0 4px 8px rgba(0,0,0,0.2)"
|
|
30
|
+
}}
|
|
31
|
+
/>
|
|
32
|
+
<p style={{fontSize: "18px", margin: "20px 0"}}>
|
|
33
|
+
You've clicked the burger
|
|
34
|
+
<strong>
|
|
35
|
+
{count}
|
|
36
|
+
</strong>
|
|
37
|
+
times!
|
|
38
|
+
</p>
|
|
39
|
+
<button
|
|
40
|
+
onClick={lambda e: any -> None { count = count + 1;}}
|
|
41
|
+
style={{
|
|
42
|
+
padding: "10px 20px",
|
|
43
|
+
fontSize: "16px",
|
|
44
|
+
backgroundColor: "#ff6b35",
|
|
45
|
+
color: "white",
|
|
46
|
+
border: "none",
|
|
47
|
+
borderRadius: "5px",
|
|
48
|
+
cursor: "pointer",
|
|
49
|
+
boxShadow: "0 2px 4px rgba(0,0,0,0.2)"
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
52
|
+
Click the Burger! 🍔
|
|
53
|
+
</button>
|
|
54
|
+
</div>;
|
|
54
55
|
}
|
|
55
56
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# Pages
|
|
2
|
-
cl import from react { useEffect }
|
|
3
2
|
# Import image using the @jac-client/assets alias
|
|
4
3
|
cl import from "@jac-client/assets/burger.png" {
|
|
5
4
|
default as burgerImage
|
|
@@ -8,104 +7,103 @@ cl import from "@jac-client/assets/burger.png" {
|
|
|
8
7
|
cl {
|
|
9
8
|
def:pub app -> any {
|
|
10
9
|
has count: int = 0;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}}
|
|
18
|
-
>
|
|
19
|
-
<h1>
|
|
20
|
-
🍔 Import Alias Example
|
|
21
|
-
</h1>
|
|
22
|
-
<p
|
|
23
|
-
style={{color: "#666", marginBottom: "20px"}}
|
|
24
|
-
>
|
|
25
|
-
Using
|
|
26
|
-
<code>
|
|
27
|
-
@jac-client/assets
|
|
28
|
-
</code>
|
|
29
|
-
alias to import assets
|
|
30
|
-
</p>
|
|
31
|
-
<img
|
|
32
|
-
src={burgerImage}
|
|
33
|
-
alt="Delicious Burger"
|
|
34
|
-
style={{
|
|
35
|
-
width: "200px",
|
|
36
|
-
height: "auto",
|
|
37
|
-
margin: "20px 0",
|
|
38
|
-
borderRadius: "10px",
|
|
39
|
-
boxShadow: "0 4px 8px rgba(0,0,0,0.2)"
|
|
40
|
-
}}
|
|
41
|
-
/>
|
|
42
|
-
<p
|
|
43
|
-
style={{fontSize: "18px", margin: "20px 0"}}
|
|
44
|
-
>
|
|
45
|
-
You've clicked the burger
|
|
46
|
-
<strong>
|
|
47
|
-
{count}
|
|
48
|
-
</strong>
|
|
49
|
-
times!
|
|
50
|
-
</p>
|
|
51
|
-
<button
|
|
52
|
-
onClick={lambda e: any -> None{ count = count + 1;} }
|
|
53
|
-
style={{
|
|
54
|
-
padding: "10px 20px",
|
|
55
|
-
fontSize: "16px",
|
|
56
|
-
backgroundColor: "#ff6b35",
|
|
57
|
-
color: "white",
|
|
58
|
-
border: "none",
|
|
59
|
-
borderRadius: "5px",
|
|
60
|
-
cursor: "pointer",
|
|
61
|
-
boxShadow: "0 2px 4px rgba(0,0,0,0.2)"
|
|
62
|
-
}}
|
|
63
|
-
>
|
|
64
|
-
Click the Burger! 🍔
|
|
65
|
-
</button>
|
|
10
|
+
|
|
11
|
+
can with count entry {
|
|
12
|
+
console.log("Count: ", count);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return
|
|
66
16
|
<div
|
|
67
17
|
style={{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
borderRadius: "5px",
|
|
72
|
-
fontSize: "12px",
|
|
73
|
-
textAlign: "left",
|
|
74
|
-
maxWidth: "600px",
|
|
75
|
-
margin: "30px auto"
|
|
18
|
+
padding: "20px",
|
|
19
|
+
textAlign: "center",
|
|
20
|
+
fontFamily: "Arial, sans-serif"
|
|
76
21
|
}}
|
|
77
22
|
>
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
</
|
|
81
|
-
<
|
|
82
|
-
|
|
23
|
+
<h1>
|
|
24
|
+
🍔 Import Alias Example
|
|
25
|
+
</h1>
|
|
26
|
+
<p style={{color: "#666", marginBottom: "20px"}}>
|
|
27
|
+
Using
|
|
28
|
+
<code>
|
|
29
|
+
@jac-client/assets
|
|
30
|
+
</code>
|
|
31
|
+
alias to import assets
|
|
32
|
+
</p>
|
|
33
|
+
<img
|
|
34
|
+
src={burgerImage}
|
|
35
|
+
alt="Delicious Burger"
|
|
36
|
+
style={{
|
|
37
|
+
width: "200px",
|
|
38
|
+
height: "auto",
|
|
39
|
+
margin: "20px 0",
|
|
40
|
+
borderRadius: "10px",
|
|
41
|
+
boxShadow: "0 4px 8px rgba(0,0,0,0.2)"
|
|
42
|
+
}}
|
|
43
|
+
/>
|
|
44
|
+
<p style={{fontSize: "18px", margin: "20px 0"}}>
|
|
45
|
+
You've clicked the burger
|
|
46
|
+
<strong>
|
|
47
|
+
{count}
|
|
48
|
+
</strong>
|
|
49
|
+
times!
|
|
50
|
+
</p>
|
|
51
|
+
<button
|
|
52
|
+
onClick={lambda e: any -> None { count = count + 1;}}
|
|
53
|
+
style={{
|
|
54
|
+
padding: "10px 20px",
|
|
55
|
+
fontSize: "16px",
|
|
56
|
+
backgroundColor: "#ff6b35",
|
|
57
|
+
color: "white",
|
|
58
|
+
border: "none",
|
|
59
|
+
borderRadius: "5px",
|
|
60
|
+
cursor: "pointer",
|
|
61
|
+
boxShadow: "0 2px 4px rgba(0,0,0,0.2)"
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
64
|
+
Click the Burger! 🍔
|
|
65
|
+
</button>
|
|
66
|
+
<div
|
|
67
|
+
style={{
|
|
68
|
+
marginTop: "30px",
|
|
69
|
+
padding: "15px",
|
|
70
|
+
backgroundColor: "#f5f5f5",
|
|
71
|
+
borderRadius: "5px",
|
|
72
|
+
fontSize: "12px",
|
|
73
|
+
textAlign: "left",
|
|
74
|
+
maxWidth: "600px",
|
|
75
|
+
margin: "30px auto"
|
|
76
|
+
}}
|
|
83
77
|
>
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
78
|
+
<strong>
|
|
79
|
+
How it works:
|
|
80
|
+
</strong>
|
|
81
|
+
<ul style={{marginTop: "10px", paddingLeft: "20px"}}>
|
|
82
|
+
<li>
|
|
83
|
+
Import using:
|
|
84
|
+
<code>
|
|
85
|
+
climportfrom'@jac-client/assets/burger.png'
|
|
86
|
+
</code>
|
|
87
|
+
</li>
|
|
88
|
+
<li>
|
|
89
|
+
Vite processes the import and generates optimized URLs
|
|
90
|
+
</li>
|
|
91
|
+
<li>
|
|
92
|
+
Assets are automatically copied from
|
|
93
|
+
<code>
|
|
94
|
+
assets/
|
|
95
|
+
</code>
|
|
96
|
+
to
|
|
97
|
+
<code>
|
|
98
|
+
compiled/assets/
|
|
99
|
+
</code>
|
|
100
|
+
during build
|
|
101
|
+
</li>
|
|
102
|
+
<li>
|
|
103
|
+
Automatic hash generation for cache busting
|
|
104
|
+
</li>
|
|
105
|
+
</ul>
|
|
106
|
+
</div>
|
|
107
|
+
</div>;
|
|
110
108
|
}
|
|
111
109
|
}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
# Pages
|
|
2
|
-
cl import from react { useEffect }
|
|
3
2
|
cl {
|
|
4
3
|
def:pub app -> any {
|
|
5
4
|
has count: int = 0;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
|
|
6
|
+
can with count entry {
|
|
7
|
+
console.log("Count: ", count);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return
|
|
11
|
+
<div>
|
|
12
|
+
<h1>
|
|
13
|
+
Hello, World!
|
|
14
|
+
</h1>
|
|
15
|
+
<p>
|
|
16
|
+
Count: {count}
|
|
17
|
+
</p>
|
|
18
|
+
<button onClick={lambda e: any -> None { count = count + 1;}}>
|
|
19
|
+
Increment
|
|
20
|
+
</button>
|
|
21
|
+
</div>;
|
|
20
22
|
}
|
|
21
23
|
}
|