Skip to content

Commit 5cda73b

Browse files
authored
Merge pull request leonardomso#640 from leonardomso/feat/changes
feat: Complete Documentation Site with 33 JavaScript Concepts
2 parents 31e3102 + d3566f5 commit 5cda73b

84 files changed

Lines changed: 72907 additions & 1241 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/CLAUDE.md

Lines changed: 411 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/action.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
pull_request:
7+
branches: [master, main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 'lts/*'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Run tests
27+
run: npm test

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,6 @@ typings/
6262

6363
# webstore IDE created directory
6464
.idea
65+
66+
# OpenCode configuration (local only)
67+
.opencode/

CONTRIBUTING.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,59 @@
11
# Contribution
22
This project would not be possible without your help and support, and we appreciate your willingness to contribute!
33

4+
## Testing
5+
6+
This project uses [Vitest](https://vitest.dev/) as the test runner to verify that code examples in the documentation work correctly.
7+
8+
### Running Tests
9+
10+
```bash
11+
# Run all tests once
12+
npm test
13+
14+
# Run tests in watch mode (re-runs on file changes)
15+
npm run test:watch
16+
17+
# Run tests with coverage report
18+
npm run test:coverage
19+
```
20+
21+
### Test Structure
22+
23+
Tests are organized by concept in the `tests/` directory:
24+
25+
```
26+
tests/
27+
├── call-stack/
28+
│ └── call-stack.test.js
29+
├── primitive-types/
30+
│ └── primitive-types.test.js
31+
└── ...
32+
```
33+
34+
### Writing Tests for Code Examples
35+
36+
When adding new code examples to concept documentation, please include corresponding tests:
37+
38+
1. **File naming**: Create `{concept-name}.test.js` in `tests/{concept-name}/`
39+
2. **Use explicit imports**:
40+
```javascript
41+
import { describe, it, expect } from 'vitest'
42+
```
43+
3. **Convert console.log examples to assertions**:
44+
```javascript
45+
// Documentation example:
46+
// console.log(typeof "hello") // "string"
47+
48+
// Test:
49+
it('should return string type', () => {
50+
expect(typeof "hello").toBe("string")
51+
})
52+
```
53+
4. **Test error cases**: Use `expect(() => { ... }).toThrow()` for operations that should throw
54+
5. **Skip browser-specific examples**: Tests run in Node.js, so skip DOM/window/document examples
55+
6. **Note strict mode behavior**: Vitest runs in strict mode, so operations that "silently fail" in non-strict mode will throw `TypeError`
56+
457
### Creating a New Translation
558

659
To create a new translation, please follow these steps:

README.md

Lines changed: 93 additions & 1215 deletions
Large diffs are not rendered by default.

TRANSLATIONS.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Translations
2+
3+
This project has been translated into 40+ languages thanks to our amazing community of contributors.
4+
5+
## Available Translations
6+
7+
- [اَلْعَرَبِيَّةُ‎ (Arabic)](https://github.com/amrsekilly/33-js-concepts) — Amr Elsekilly
8+
- [Български (Bulgarian)](https://github.com/thewebmasterp/33-js-concepts) — thewebmasterp
9+
- [汉语 (Chinese)](https://github.com/stephentian/33-js-concepts) — Re Tian
10+
- [Português do Brasil (Brazilian Portuguese)](https://github.com/tiagoboeing/33-js-concepts) — Tiago Boeing
11+
- [한국어 (Korean)](https://github.com/yjs03057/33-js-concepts.git) — Suin Lee
12+
- [Español (Spanish)](https://github.com/adonismendozaperez/33-js-conceptos) — Adonis Mendoza
13+
- [Türkçe (Turkish)](https://github.com/ilker0/33-js-concepts) — İlker Demir
14+
- [русский язык (Russian)](https://github.com/gumennii/33-js-concepts) — Mihail Gumennii
15+
- [Tiếng Việt (Vietnamese)](https://github.com/nguyentranchung/33-js-concepts) — Nguyễn Trần Chung
16+
- [Polski (Polish)](https://github.com/lip3k/33-js-concepts) — Dawid Lipinski
17+
- [فارسی (Persian)](https://github.com/majidalavizadeh/33-js-concepts) — Majid Alavizadeh
18+
- [Bahasa Indonesia (Indonesian)](https://github.com/rijdz/33-js-concepts) — Rijdzuan Sampoerna
19+
- [Français (French)](https://github.com/robinmetral/33-concepts-js) — Robin Métral
20+
- [हिन्दी (Hindi)](https://github.com/vikaschauhan/33-js-concepts) — Vikas Chauhan
21+
- [Ελληνικά (Greek)](https://github.com/DimitrisZx/33-js-concepts) — Dimitris Zarachanis
22+
- [日本語 (Japanese)](https://github.com/oimo23/33-js-concepts) — oimo23
23+
- [Deutsch (German)](https://github.com/burhannn/33-js-concepts) — burhannn
24+
- [украї́нська мо́ва (Ukrainian)](https://github.com/AndrewSavetchuk/33-js-concepts-ukrainian-translation) — Andrew Savetchuk
25+
- [සිංහල (Sinhala)](https://github.com/ududsha/33-js-concepts) — Udaya Shamendra
26+
- [Italiano (Italian)](https://github.com/Donearm/33-js-concepts) — Gianluca Fiore
27+
- [Latviešu (Latvian)](https://github.com/ANormalStick/33-js-concepts) — Jānis Īvāns
28+
- [Afaan Oromoo (Oromo)](https://github.com/Amandagne/33-js-concepts) — Amanuel Dagnachew
29+
- [ภาษาไทย (Thai)](https://github.com/ninearif/33-js-concepts) — Arif Waram
30+
- [Català (Catalan)](https://github.com/marioestradaf/33-js-concepts) — Mario Estrada
31+
- [Svenska (Swedish)](https://github.com/FenixHongell/33-js-concepts/) — Fenix Hongell
32+
- [ខ្មែរ (Khmer)](https://github.com/Chhunneng/33-js-concepts) — Chrea Chanchhunneng
33+
- [አማርኛ (Ethiopian)](https://github.com/hmhard/33-js-concepts) — Miniyahil Kebede (ምንያህል ከበደ)
34+
- [Беларуская мова (Belarussian)](https://github.com/Yafimau/33-js-concepts) — Dzianis Yafimau
35+
- [O'zbekcha (Uzbek)](https://github.com/smnv-shokh/33-js-concepts) — Shokhrukh Usmonov
36+
- [Urdu (اردو)](https://github.com/sudoyasir/33-js-concepts) — Yasir Nawaz
37+
- [हिन्दी (Hindi)](https://github.com/milostivyy/33-js-concepts) — Mahima Chauhan
38+
- [বাংলা (Bengali)](https://github.com/Jisan-mia/33-js-concepts) — Jisan Mia
39+
- [ગુજરાતી (Gujarati)](https://github.com/VatsalBhuva11/33-js-concepts) — Vatsal Bhuva
40+
- [سنڌي (Sindhi)](https://github.com/Sunny-unik/33-js-concepts) — Sunny Gandhwani
41+
- [भोजपुरी (Bhojpuri)](https://github.com/debnath003/33-js-concepts) — Pronay Debnath
42+
- [ਪੰਜਾਬੀ (Punjabi)](https://github.com/Harshdev098/33-js-concepts) — Harsh Dev Pathak
43+
- [Latin (Latin)](https://github.com/Harshdev098/33-js-concepts) — Harsh Dev Pathak
44+
- [മലയാളം (Malayalam)](https://github.com/Stark-Akshay/33-js-concepts) — Akshay Manoj
45+
- [Yorùbá (Yoruba)](https://github.com/ayobaj/33-js-concepts) — Ayomide Bajulaye
46+
- [עברית‎ (Hebrew)](https://github.com/rafyzg/33-js-concepts) — Refael Yzgea
47+
- [Nederlands (Dutch)](https://github.com/dlvisser/33-js-concepts) — Dave Visser
48+
- [தமிழ் (Tamil)](https://github.com/UdayaKrishnanM/33-js-concepts) — Udaya Krishnan M
49+
50+
---
51+
52+
## Want to Translate?
53+
54+
We'd love to have more translations! See our [Contributing Guidelines](CONTRIBUTING.md) for details on how to submit a translation.

0 commit comments

Comments
 (0)