1
2
3
4
5
6
7
8
9
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191<!--
CO_OP_TRANSLATOR_METADATA:
{
"original_hash": "5301875c55bb305e6046bed3a4fd06d2",
"translation_date": "2025-08-27T21:10:49+00:00",
"source_file": "quiz-app/README.md",
"language_code": "he"
}
-->
# ืืคืืืงืฆืืืช ืืืืื ืื
ืืืืืื ืื ืืืื ืื ืืืืื ื ืืจืื ืืืืจื ืืจืฆืื ืขืืืจ ืชืืื ืืช ืืืืืืืื ืืืืขื ืื ืชืื ืื ืืืชืืืช https://aka.ms/webdev-beginners
## ืืืกืคืช ืกื ืืืืื ืื ืืชืืจืื
ืืืกืฃ ืชืจืืื ืืืืืื ืขื ืืื ืืฆืืจืช ืืื ื ืืืืื ืชืืืืื ืืชืืงืืืช `assets/translations`. ืืืืืื ืื ืืืงืืจืืื ื ืืฆืืื ื-`assets/translations/en`. ืืืืืื ืื ืืืืืงืื ืืืกืคืจ ืงืืืฆืืช. ืืื ืฉืืืกืคืืจ ืชืืื ืืช ืืืืง ืืืชืืื ืฉื ืืืืืื. ืืฉื ื 40 ืืืืื ืื ืืกื ืืื ืืชืืื ืืช ืืืืืืืื ืืื, ืขื ืืืกืคืืจ ืฉืืชืืื ื-0.
<details>
<summary>ืื ื ืจืื ืงืืืฅ ืชืจืืื:</summary>
```
[
{
"title": "A title",
"complete": "A complete button title",
"error": "An error message upon selecting the wrong answer",
"quizzes": [
{
"id": 1,
"title": "Title",
"quiz": [
{
"questionText": "The question asked",
"answerOptions": [
{
"answerText": "Option 1 title",
"isCorrect": true
},
{
"answerText": "Option 2 title",
"isCorrect": false
}
]
}
]
}
]
}
]
```
</details>
ืืืืจ ืขืจืืืช ืืชืจืืืืื, ืขืจืื ืืช ืงืืืฅ index.js ืืชืืงืืืช ืืชืจืืื ืืื ืืืืื ืืช ืื ืืงืืฆืื ืืืชืื ืืื ืืืืช ื-`en`.
ืขืจืื ืืช ืืงืืืฅ `index.js` ื-`assets/translations` ืืื ืืืืื ืืช ืืงืืฆืื ืืืชืืจืืืื ืืืืฉืื.
ืืืืืื, ืื ืงืืืฅ ื-JSON ืฉื ืืชืจืืื ืฉืื ืืื `ex.json`, ืืคืื ืืช 'ex' ืืืคืชื ืืืืงืืืืฆืื, ืืื ืืื ืก ืืืชื ืืคื ืฉืืืฆื ืืืื ืืื ืืืืื ืืืชื:
<details>
<summary>index.js</summary>
```
import ex from "./ex.json";
// if 'ex' is localization key then enter it like so in `messages` to expose it
const messages = {
ex: ex[0],
};
export default messages;
```
</details>
## ืืจืฅ ืืช ืืคืืืงืฆืืืช ืืืืืื ืื ืืืืคื ืืงืืื
### ืืจืืฉืืช ืืืงืืืืช
- ืืฉืืื GitHub
- [Node.js ื-Git](https://nodejs.org/)
### ืืชืงื ื ืืืืืจื
1. ืฆืืจ ืืืืจ ืืืชืื ืืช ืืื [ืืื](https://github.com/new?template_name=Web-Dev-For-Beginners&template_owner=microsoft)
1. ืฉืืื ืืช ืืืืืจ ืืืืฉ ืฉืื, ืืขืืืจ ืืืคืืืงืฆืืืช ืืืืืื ืื
```bash
git clone https://github.com/your-github-organization/repo-name
cd repo-name/quiz-app
```
1. ืืชืงื ืืช ืืืืืืช ื-npm ืืืชืืืืืช
```bash
npm install
```
### ืื ืืืช ืืืคืืืงืฆืื
1. ืืื ืืื ืืช ืืช ืืคืชืจืื, ืืจืฅ:
```bash
npm run build
```
### ืืคืขืืช ืืืคืืืงืฆืื
1. ืืื ืืืคืขืื ืืช ืืคืชืจืื, ืืจืฅ:
```bash
npm run dev
```
### [ืืืคืฆืืื ืื] ืืืืงืช ืงืื
1. ืืื ืืืืื ืฉืืงืื ื ืืืง, ืืจืฅ:
```bash
npm run lint
```
## ืคืจืืกืช ืืคืืืงืฆืืืช ืืืืืื ืื ื-Azure
### ืืจืืฉืืช ืืืงืืืืช
- ืื ืื Azure. ืืืจืฉื ืืื ืื ืืื ืื [ืืื](https://aka.ms/azure-free).
_ืืขืจืืช ืขืืืช ืืคืจืืกืช ืืคืืืงืฆืืืช ืืืืืื ืื ืืื: ืืื ื_
[](https://portal.azure.com/#create/Microsoft.StaticApp)
ืืืืจ ืฉื ืื ืกืช ื-Azure ืืจื ืืงืืฉืืจ ืืืขืื, ืืืจ ืื ืื ืืงืืืฆืช ืืฉืืืื ืืื:
- ืคืจืื ืืคืืืงืฆืืืช ืืืื ืืจื ื ืืกืืืืช: ืกืคืง ืฉื ืืืืจ ืชืืื ืืช ืืืจืื
- ืื ืืกื ื-GitHub: ืืืืจ ืืช ืืงืืจ ืืคืจืืกื ืฉืื ื-GitHub ืืื ืืชืืืจ ืืืื ืืช ืืฉืืืช ืื ืืจืฉืื ืืืืคืก:
- *ืืจืืื* โ ืืืจ ืืช ืืืจืืื ืฉืื.
- *ืืืืจ* โ ืืืจ ืืช ืืืืจ ืชืืื ืืช ืืืืืืืื Web Dev for Beginners.
- *ืขื ืฃ* - ืืืจ ืขื ืฃ (main)
- ืืืืจืืช ืื ืืื: Azure Static Web Apps ืืฉืชืืฉ ืืืืืืจืืชื ืืืืื ืืื ืืืืืช ืืช ืืืกืืจืช ืฉืื ื ืขืฉื ืฉืืืืฉ ืืืคืืืงืฆืื ืฉืื.
- *ืืืงืื ืืืคืืืงืฆืื* - ./quiz-app
- *ืืืงืื ื-Api* -
- *ืืืงืื ืืคืื* - dist
- ืคืจืืกื: ืืืฅ ืขื 'Review + Create', ืืื 'Create'
ืืืืจ ืืคืจืืกื, ืงืืืฅ ืืจืืืช ืขืืืื ืืืืืฆืจ ืืชืืงืืืช *.github* ืฉื ืืืืืจ ืฉืื. ืงืืืฅ ืืจืืืช ืขืืืื ืื ืืืื ืืืจืืืช ืขื ืืืจืืขืื ืฉืืคืขืืื ืคืจืืกื ืืืืฉ ืฉื ืืืคืืืงืฆืื ื-Azure, ืืืืืื, _**push** ืขื ืขื ืฃ **main**_ ืืื'.
<details>
<summary>ืืืืื ืืงืืืฅ ืืจืืืช ืขืืืื</summary>
ืื ื ืืืืื ืืืื ืงืืืฅ ืืจืืืช ืืขืืืื ืฉื GitHub Actions ืขืฉืื ืืืืจืืืช:
name: Azure Static Web Apps CI/CD
```
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
jobs:
build_and_deploy_job:
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v2
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "quiz-app" # App source code path
api_location: ""API source code path optional
output_location: "dist" #Built app content directory - optional
```
</details>
- ืืืืจ ืืคืจืืกื: ืืืืจ ืฉืืคืจืืกื ืืืฉืืื, ืืืฅ ืขื 'Go to Deployment' ืืื 'View app in browser'.
ืืืืจ ืฉ-GitHub Action (ืืจืืืช ืืขืืืื) ืฉืื ืืืฆืขื ืืืฆืืื, ืจืขื ื ืืช ืืืฃ ืืื ืืื ืืฆืคืืช ืืืคืืืงืฆืื ืฉืื.
---
**ืืชื ืืืชืืจ**:
ืืกืื ืื ืชืืจืื ืืืืฆืขืืช ืฉืืจืืช ืชืจืืื ืืืืกืก ืืื ื ืืืืืืชืืช [Co-op Translator](https://github.com/Azure/co-op-translator). ืืขืื ืฉืื ื ืฉืืืคืื ืืืืืง, ืืฉ ืืืืืช ืืืืขืื ืืื ืฉืชืจืืืืื ืืืืืืืืื ืขืฉืืืื ืืืืื ืฉืืืืืช ืื ืื ืืืืงืื. ืืืกืื ืืืงืืจื ืืฉืคืชื ืืืงืืจืืช ืฆืจืื ืืืืืฉื ืืืงืืจ ืกืืืืชื. ืขืืืจ ืืืืข ืงืจืืื, ืืืืืฅ ืืืฉืชืืฉ ืืชืจืืื ืืงืฆืืขื ืขื ืืื ืืื. ืืื ื ื ื ืืฉืืื ืืืืจืืืช ืืื ืืื ืืช ืื ืืคืจืฉื ืืืืช ืฉืืืืืช ืื ืืืขืืช ืืฉืืืืฉ ืืชืจืืื ืื.