Skip to content

Commit 16e26b0

Browse files
Update book (#9)
* refactor: Remove files * refactor: Add meta info * refactor: Move tasks description to /book * refactor: To en version * refactor: Modify tests tutorial * style: Fmt
1 parent 1d375ae commit 16e26b0

9 files changed

Lines changed: 98 additions & 96 deletions

File tree

book/book.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[book]
2-
authors = ["sunrisepeak"]
2+
authors = ["mcpp-community"]
33
language = "en"
44
multilingual = false
55
src = "src"
6-
title = "D2X Project Template | D2X项目模板"
6+
title = "D2MySTL | A Mini STL Tutorial from Scratch"
77

88
[output.html]
9-
git-repository-url = "https://github.com/d2learn/d2x-project-template"
9+
git-repository-url = "https://github.com/mcpp-community/d2mystl"

book/src/README_en.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# D2MySTL
2+
3+
> Implement a mini STL library from scratch
4+
5+
[![d2x](https://img.shields.io/badge/d2x-ok-green.svg)](https://github.com/d2learn/d2x)
6+
[![Online-ebook](https://img.shields.io/badge/online-ebook-orange.svg)](https://github.com/d2learn/d2x)
7+
[![License](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](LICENSE-CODE)
8+
9+
| [d2x Tool](https://github.com/d2learn/d2x) - [Docs](https://mcpp-community.github.io/d2mystl) - [Forum](https://mcpp.d2learn.org/forum) |
10+
| --- |
11+
12+
## Quick Start
13+
14+
### 1: d2x automatic code detection
15+
16+
<details>
17+
<summary>Click to view the xlings installation command</summary>
18+
19+
---
20+
21+
#### Linux/MacOS
22+
23+
```bash
24+
curl -fsSL https://d2learn.org/xlings-install.sh | bash
25+
```
26+
27+
#### Windows - PowerShell
28+
29+
```bash
30+
irm https://d2learn.org/xlings-install.ps1.txt | iex
31+
```
32+
33+
> tips: xlings -> [details](https://xlings.d2learn.org)
34+
35+
---
36+
37+
</details>
38+
39+
**Obtain the project**
40+
41+
```
42+
d2x install d2mystl
43+
```
44+
45+
**Enter practice mode**
46+
47+
```
48+
d2x checker
49+
```
50+
51+
### 2: Hands-on Verification
52+
53+
**Obtain the project**
54+
55+
```
56+
git clone https://github.com/mcpp-community/d2mystl.git
57+
```
58+
59+
**Run the test code manually**
60+
61+
```
62+
xmake run chapter0_tests
63+
```
64+
65+
> Note: The test name format is `chapter[x]_tests`
66+
67+
## Pre-requisite Tutorials
68+
69+
If you find this tutorial a bit challenging to get started with, you can first learn the following tutorial to understand the basics and core syntax features of modern C++.
70+
71+
| Project | Description | Note |
72+
| --- | --- | --- |
73+
| [mcpp-start](https://github.com/mcpp-community/mcpp-start) | Modern C++, Go! - `import std` | Beginner-0 |
74+
| [d2mcpp](https://github.com/mcpp-community/d2mcpp) | Introduction to Modern C++ Core Features | Beginner-1 |
75+
76+
## Other
77+
78+
- [d2x Tool](https://github.com/d2learn/d2x)
79+
- [Forum discussion and feedback](https://mcpp.d2learn.org/forum)
80+
- `Communication group`: 1067245099

book/src/SUMMARY.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Summary
22

3-
- [简介](./chapter_0.md)
4-
- [工具与环境配置](./chapter_1.md)
5-
- [使用教程](./chapter_2.md)
3+
- [README](./README_en.md)
4+
- [Tools/Environment Setup](./setup.md)
65

7-
# 正文
6+
# Main Text
87

9-
- [实现array](./chapter_3.md)
8+
- [Global Module and Meta Information](./chapter0.md)
9+
- [Array Module Implementation](./chapter1.md)
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,9 @@ My Standard Template Library
164164

165165
## Run Unit Tests
166166

167-
You can run unit tests on your code using the following command:
167+
You can run unit tests on your code using the following command:\
168+
`xmake f -m release`\
168169
`xmake run chapter0_tests`\
169-
You can also run unit tests on the reference code to compare it with your implementation:
170-
`xmake run chapter0_ref_tests`
170+
You can also run unit tests on the reference code to compare it with your implementation:\
171+
`xmake f -m debug`\
172+
`xmake run chapter0_tests`
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ Zero-sized array empty: true
186186

187187
## Run Unit Tests
188188

189-
You can run unit tests on your code using the following command:
189+
You can run unit tests on your code using the following command:\
190+
`xmake f -m release`\
190191
`xmake run chapter1_tests`\
191-
You can also run unit tests on the reference code to compare it with your implementation:
192-
`xmake run chapter1_ref_tests`
192+
You can also run unit tests on the reference code to compare it with your implementation:\
193+
`xmake f -m debug`\
194+
`xmake run chapter1_tests`

book/src/chapter_0.md

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

book/src/chapter_2.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

book/src/chapter_3.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)