Skip to content

Commit 4dac089

Browse files
author
Ezaz
committed
updated: svelte.json updated according to latest docs of svelte
1 parent 6c48d8e commit 4dac089

1 file changed

Lines changed: 45 additions & 28 deletions

File tree

data/svete.json

Lines changed: 45 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,102 +14,119 @@
1414
},
1515
{
1616
"title": "এসভেল্ট এর সাধারণ বিষয়াবলি",
17-
"items": [{
18-
"definition": "ভ্যারিয়েবল ডিক্লেয়ার",
19-
"code": "<script> \n let name = 'world'; \n</script> \n<h1>Hello {name}!</h1>"
17+
"items":
18+
[
19+
{
20+
"definition": "এসভেল্ট এ 'Hello world' প্রিন্ট করা",
21+
"code": "//App.svelte\n\n<h1>Hello world!</h1>"
22+
},
23+
{
24+
"definition": "ডাটা যুক্ত করা(ভ্যারিয়েবল ডিক্লেয়ার)",
25+
"code": "//App.svelte\n\n<script> \n let name = 'world';\n</script> \n\n<h1>Hello {name}!</h1>"
2026
},
2127
{
2228
"definition": "ডায়ন্যামিক অ্যাট্রিবিউট",
23-
"code": "<script> \n let src = 'tutorial/image.gif', widht='100', height='100'; \n</script> \n<img {src} {width} {height}>"
29+
"code": "//App.svelte\n\n<script> \n let src = 'tutorial/image.gif', widht='100', height='100';\n</script> \n\n<img {src} {width} {height}>"
2430
},
2531
{
2632
"definition": "কম্পোনেন্ট স্ট্যাইল",
27-
"code": "\n<p>This is a paragraph.</p>\n<style>\np{\n\tcolor: purple;\n}\n</style>"
33+
"code": "//App.svelte\n\n<p>This is a paragraph.</p>\n\n<style>\n p{\n color: purple;\n }\n</style>"
2834
},
2935
{
3036
"definition": "নেস্টেড কম্পোনেন্ট",
3137
"code": [
32-
"\n//App.svelte \n<script>\n\t import ChildComponent from './Child.svelte'; \n</script> \n<h2>I'm Parent Component</h2> \n<ChildComponent/> \n",
33-
"\n//Child.svelte \n <h2>I'm Child Component</h2>"
38+
"//App.svelte\n\n<script>\n import NestedComponent from './Nested.svelte'; \n</script>\n\n<h2>I'm Parent Component</h2> \n<NestedComponent/> \n",
39+
"\n//Nested.svelte \n\n<h2>I'm Nested Component</h2>"
3440
]
3541
},
42+
{
43+
"definition": "HTML ট্যাগস",
44+
"code": [
45+
"//App.svelte\n\n<script>\n let string = `this string contains some <strong>HTML!!!</strong>`; \n</script>\n\n<h2><p>{@html string}</p></h2>\n"
46+
]
47+
}
48+
]
49+
},
50+
{
51+
"title": "এসভেল্ট এর অন্যান্য বিষয়াবলি",
52+
"items": [
3653
{
3754
"definition": "নেস্টেড কম্পোনেন্ট এ props পাঠানো",
3855
"code": [
39-
"//App.svelte \n <script>\n import ChildComponent from './Child.svelte'; \n let title = 'I'm Child Component'; \n</script> \n <h2>I'm Parent Component</h2> \n <ChildComponent {title}/> \n",
40-
"\n//Child.svelte \n <script> \n export let title; \n</script> \n<h2>{title || 'Hello world'}</h2>"
56+
"//App.svelte \n\n<script>\n import ChildComponent from './Child.svelte'; \n let title = 'I'm Child Component'; \n</script> \n\n<h2>I'm Parent Component</h2> \n<ChildComponent {title}/> \n",
57+
"\n// Child.svelte \n\n<script> \n export let title; \n</script> \n\n<h2>{title || 'Hello world'}</h2>"
4158
]
4259
},
4360
{
4461
"definition": "ডিফল্ট props",
4562
"code": [
46-
"//App.svelte \n <script>\n import ChildComponent from './Child.svelte'; \n let title = 'I'm Child Component'; \n</script> \n <h2>I'm Parent Component</h2> \n",
47-
"<ChildComponent {title}/> \n <ChildComponent/> \n",
48-
"\n//Child.svelte \n <script> \n export let title = 'Hello world'; \n</script> \n<h2>{title}</h2>"
63+
"//App.svelte \n\n<script>\n import ChildComponent from './Child.svelte'; \n let title = 'I'm Child Component'; \n</script> \n\n<h2>I'm Parent Component</h2> \n",
64+
"<ChildComponent {title}/> \n<ChildComponent/> \n",
65+
"\n//Child.svelte \n\n<script> \n export let title = 'Hello world'; \n</script> \n\n<h2>{title}</h2>"
4966
]
5067
},
5168
{
5269
"definition": "ইভেন্ট হ্যান্ডেলার",
5370
"code": [
54-
"<script> \n let count = 0; \n function incrementCount() { \n\t count += 1; \n } \n</script>\n",
71+
"<script> \n let count = 0; \n function incrementCount() { \n count += 1; \n } \n</script>\n\n",
5572
"<button on:click={incrementCount}> Clicked {count} {count === 1 ? 'time' : 'times'}</button>"
5673
]
5774
},
5875
{
5976
"definition": "রিয়্যাক্টিভ অ্যাসাইনমেন্ট",
6077
"code": [
61-
"<script> \n let count = 0; \n $: doubled = count * 2; \n function incrementCount() { \n\t count += 1; \n } \n</script>\n",
78+
"<script> \n let count = 0; \n $: doubled = count * 2; \n function incrementCount() { \n count += 1; \n } \n</script>\n\n",
6279
"<button on:click={incrementCount}> Clicked {count} {count === 1 ? 'time' : 'times'}</button>\n",
6380
"<p>{count} doubled is {doubled}</p>"
6481
]
6582
},
6683
{
6784
"definition": "রিয়্যাক্টিভ লজিক",
6885
"code": [
69-
"<script>\n let x = 7;\n </script>\n",
86+
"<script>\n let x = 7;\n</script>\n\n",
7087
"{#if x > 10}\n <p>{x} is greater than 10</p> \n {:else if 5 > x}\n <p>{x} is less than 5</p> \n {:else}\n <p>{x} is between 5 and 10</p>\n {/if}\n"
7188
]
7289
},
7390
{
7491
"definition": "লজিক",
7592
"code": [
76-
"<script> \n let count = 0; \n $: if (count >= 10) { \n alert(`count is dangerously high!`); \n count = 9; \n} \n function incrementCount() { \n count += 1; \n } \n</script>\n",
93+
"<script> \n let count = 0; \n $: if (count >= 10) { \n alert(`count is dangerously high!`); \n count = 9; \n} \n function incrementCount() { \n count += 1; \n } \n</script>\n\n",
7794
"<button on:click={incrementCount}> Clicked {count} {count === 1 ? 'time' : 'times'}</button>\n"
7895
]
7996
},
8097
{
8198
"definition": "লুপ",
8299
"code": [
83-
"<script> \n let cats = [ { id: 'J---aiyznGQ', name: 'Keyboard Cat' }, { id: 'z_AbfPXTKms', name: 'Maru' }, { id: 'OUtn3pvWmpg', name: 'Henri The Existential Cat' } ]; \n</script> \n",
100+
"<script> \n let cats = [{ \n\tid: 'J---aiyznGQ', name: 'Keyboard Cat' }, \n\t{ id: 'z_AbfPXTKms', name: 'Maru' },\n\t{ id: 'OUtn3pvWmpg', name: 'Henri The Existential Cat' }]; \n</script> \n\n",
84101
"<h1>The Famous Cats of YouTube</h1>\n",
85-
"{#each cats as { id, name }, i} \n <div> \n <a target='_blank' href='https: //www.youtube.com/watch?v={id}'>{i + 1}: {name}</a> \n </div> \n {/each}"
102+
"{#each cats as { id, name }, i} \n <div> \n <a target='_blank' href='https: //www.youtube.com/watch?v={id}'>{i + 1}: {name}</a> \n </div> \n{/each}"
86103
]
87104
},
88105
{
89106
"definition": "ডম ইভেন্ট হ্যান্ডেলার",
90107
"code": [
91-
"<script> \n let m = { x: 0, y: 0 }; \n function handleMousemove(event) { \n m.x = event.clientX; \n m.y = event.clientY; \n } \n </script> \n",
92-
"<div on:mousemove={handleMousemove}> \n The mouse position is {m.x} x {m.y} \n </div> \n",
93-
"<style> \n div { \n width: 100%; \n height: 100%; \n } \n</style>"
108+
"<script> \n let m = { x: 0, y: 0 }; \n function handleMousemove(event) { \n m.x = event.clientX; \n m.y = event.clientY; \n } \n</script> \n\n",
109+
"<div on:mousemove={handleMousemove}> \n The mouse position is {m.x} x {m.y} \n</div> \n\n",
110+
"<style> \n div { \n width: 100%; \n height: 100%; \n } \n</style>"
94111
]
95112
},
96113
{
97114
"definition": "ইনলাইন ডম ইভেন্ট হ্যান্ডেলার",
98115
"code": [
99-
"<script> \n let m = { x: 0, y: 0 }; \n </script> \n",
100-
"<div on:mousemove='{e => m = { x: e.clientX, y: e.clientY}}'> \n The mouse position is {m.x} x {m.y} \n </div> \n",
101-
"<style> \n div { \n width: 100%; \n height: 100%; \n } \n</style>"
116+
"<script> \n let m = { x: 0, y: 0 }; \n</script> \n\n",
117+
"<div on:mousemove='{e => m = { x: e.clientX, y: e.clientY}}'> \n The mouse position is {m.x} x {m.y} \n</div> \n\n",
118+
"<style> \n div { \n width: 100%; \n height: 100%;\n } \n</style>"
102119
]
103120
},
104121
{
105122
"definition": "কম্পোনেন্ট ইভেন্টস",
106123
"code": [
107124
"//App.svelte ",
108-
"\n <script> \n import Inner from './Inner.svelte'; \n function handleMessage(event) { \n alert(event.detail.text); \n } \n </script> \n",
125+
"\n\n<script> \n import Inner from './Inner.svelte'; \n function handleMessage(event) { \n alert(event.detail.text); \n } \n</script> \n\n",
109126
"<Inner on:message={handleMessage}/>",
110127
"\n\n//Inner.svelte",
111-
"\n <script> \n import { createEventDispatcher } from 'svelte'; \n const dispatch = createEventDispatcher(); \n ",
112-
"function sayHello() { \n dispatch('message', { \n\t text: 'Hello!'}); \n } \n </script> \n",
128+
"\n\n<script> \n import { createEventDispatcher } from 'svelte'; \n const dispatch = createEventDispatcher(); \n ",
129+
" function sayHello() { \n dispatch('message', {text: 'Hello!'}); \n } \n </script> \n\n",
113130
"<button on:click={sayHello}> Click to say hello </button>"
114131
]
115132
},
@@ -170,7 +187,7 @@
170187
"items": [{
171188
"definition": "রাইটেবল(writable)",
172189
"code": [
173-
"import { writable } from 'svelte/store';\n\nconst count = writable(0);\ncount.subscribe(value => {\n\tconsole.log(value);\n}); // logs '0'\ncount.set(1);\ncount.set(1); // logs '1'\ncount.update(n => n + 1); // logs '2'"
190+
"import { writable } from 'svelte/store';\n\nconst count = writable(0);\ncount.subscribe(value => {\n\tconsole.log(value);\n}); // logs '0'\n\ncount.set(1); // logs '1'\ncount.update(n => n + 1); // logs '2'"
174191
]
175192
},
176193
{

0 commit comments

Comments
 (0)