Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ Deep link authority = `publisher.name` → `RuanJiazhen.learn-by-diff`.

## Examples

- `packages/courses-config` — course catalog plus each course’s JSONC. Includes `chibivue-zh-cn` and `demo-course` (git URL + `source.root: examples/demo-source`, chapter `docs` samples: https tutorial, Markdown, PDF).
- `packages/courses-config` — course catalog plus each course’s JSONC. Includes `chibivue-zh-cn`, `chibivue-zh-tw`, `chibivue-ja`, `chibivue-en` (same `book/impls` snapshots; chapter `docs` follow the book locale) and `demo-course` (git URL + `source.root: examples/demo-source`, chapter `docs` samples: https tutorial, Markdown, PDF).
- `examples/demo-source` — `start` / `skeleton` / `particles` / `follow` / `glow` snapshots (canvas particles that follow the cursor).
- `apps/website` — VitePress docs site (`https://rjiazhen.github.io/learn-by-diff/`).

Expand Down
3 changes: 3 additions & 0 deletions packages/courses-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
| 目录 | 课程 | 语言 | 说明 |
| -------------------------------------------------------- | -------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [chibivue-zh-cn](./chibivue-zh-cn/course.jsonc) | chibivue:从一行 Hello, World 开始,逐步构建 | 简体中文 | 对照 [chibivue 在线书](https://book.chibivue.land/zh-cn/00-introduction/010-about.html),从 `createApp` 逐步实现 Vue.js。源码来自 [chibivue](https://github.com/chibivue-land/chibivue) 的 `book/impls`。 |
| [chibivue-zh-tw](./chibivue-zh-tw/course.jsonc) | chibivue:從一行 Hello, World 開始,逐步建置 | 繁體中文 | 對照 [chibivue 線上書](https://book.chibivue.land/zh-tw/00-introduction/010-about.html),從 `createApp` 逐步實作 Vue.js。源碼同樣來自 `book/impls`。 |
| [chibivue-ja](./chibivue-ja/course.jsonc) | chibivue:Hello, World の 1 行から一歩ずつ | 日本語 | [chibivue オンラインブック](https://book.chibivue.land/ja/00-introduction/010-about.html)に沿って、`createApp` から Vue.js を実装する。ソースは同じ `book/impls`。 |
| [chibivue-en](./chibivue-en/course.jsonc) | chibivue: from one line of Hello, World | English | Follow the [chibivue book](https://book.chibivue.land/00-introduction/010-about.html) and implement Vue.js from `createApp`. Snapshots are the same `book/impls` tree. |
| [demo-course](./demo-course/.course-config/course.jsonc) | Cursor particles | English | 本仓库内的示例课。快照在 `examples/demo-source`。 |

后续课程会继续以独立目录的形式加入本目录。新增含顶层 `course.jsonc` 的目录时,提交前的钩子会把它补进 `courses.jsonc`。`.course-config/course.jsonc` 这种布局需要手写目录行。
9 changes: 9 additions & 0 deletions packages/courses-config/chibivue-en/chapters/001-about.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://raw.githubusercontent.com/RJiazhen/learn-by-diff/refs/heads/main/packages/protocol/schema.json#/$defs/chapter",
"id": "about",
"title": "Getting Started",
"fromDir": "",
"toDir": "",
"docs": "https://book.chibivue.land/00-introduction/010-about",
"changedFiles": [],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://raw.githubusercontent.com/RJiazhen/learn-by-diff/refs/heads/main/packages/protocol/schema.json#/$defs/chapter",
"id": "what-is-vue",
"title": "What is Vue.js?",
"fromDir": "",
"toDir": "",
"docs": "https://book.chibivue.land/00-introduction/020-what-is-vue",
"changedFiles": [],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://raw.githubusercontent.com/RJiazhen/learn-by-diff/refs/heads/main/packages/protocol/schema.json#/$defs/chapter",
"id": "vue-core-components",
"title": "Key Elements of Vue.js",
"fromDir": "",
"toDir": "",
"docs": "https://book.chibivue.land/00-introduction/030-vue-core-components",
"changedFiles": [],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"$schema": "https://raw.githubusercontent.com/RJiazhen/learn-by-diff/refs/heads/main/packages/protocol/schema.json#/$defs/chapter",
"id": "setup-project",
"title": "Approach in This Book and Setting Up the Environment",
"fromDir": "",
"toDir": "00_introduction/010_project_setup",
"docs": "https://book.chibivue.land/00-introduction/040-setup-project",
"changedFiles": [
{
"path": "examples/playground/index.html",
"kind": "U",
},
{
"path": "examples/playground/package.json",
"kind": "U",
},
{
"path": "examples/playground/src/main.ts",
"kind": "U",
},
{
"path": "examples/playground/tsconfig.json",
"kind": "U",
},
{
"path": "examples/playground/vite.config.ts",
"kind": "U",
},
{
"path": "package.json",
"kind": "U",
},
{
"path": "packages/index.ts",
"kind": "U",
},
{
"path": "pnpm-workspace.yaml",
"kind": "U",
},
{
"path": "tsconfig.json",
"kind": "U",
},
{
"path": "vite.config.ts",
"kind": "U",
},
],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "https://raw.githubusercontent.com/RJiazhen/learn-by-diff/refs/heads/main/packages/protocol/schema.json#/$defs/chapter",
"id": "create-app-api",
"title": "First Rendering and the createApp API",
"fromDir": "00_introduction/010_project_setup",
"toDir": "10_minimum_example/010_create_app",
"docs": "https://book.chibivue.land/10-minimum-example/010-create-app-api",
"changedFiles": [
{
"path": "examples/playground/src/main.ts",
"kind": "M",
},
{
"path": "examples/playground/vite.config.ts",
"kind": "M",
},
{
"path": "packages/index.ts",
"kind": "M",
},
{
"path": "tests/e2e.spec.ts",
"kind": "U",
},
],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"$schema": "https://raw.githubusercontent.com/RJiazhen/learn-by-diff/refs/heads/main/packages/protocol/schema.json#/$defs/chapter",
"id": "package-architecture",
"title": "Package Architecture",
"fromDir": "10_minimum_example/010_create_app",
"toDir": "10_minimum_example/015_package_architecture",
"docs": "https://book.chibivue.land/10-minimum-example/015-package-architecture",
"changedFiles": [
{
"path": "examples/playground/vite.config.ts",
"kind": "M",
},
{
"path": "packages/index.ts",
"kind": "M",
},
{
"path": "packages/runtime-core/apiCreateApp.ts",
"kind": "U",
},
{
"path": "packages/runtime-core/component.ts",
"kind": "U",
},
{
"path": "packages/runtime-core/componentOptions.ts",
"kind": "U",
},
{
"path": "packages/runtime-core/index.ts",
"kind": "U",
},
{
"path": "packages/runtime-core/renderer.ts",
"kind": "U",
},
{
"path": "packages/runtime-dom/index.ts",
"kind": "U",
},
{
"path": "packages/runtime-dom/nodeOps.ts",
"kind": "U",
},
{
"path": "tests/e2e.spec.ts",
"kind": "M",
},
],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"$schema": "https://raw.githubusercontent.com/RJiazhen/learn-by-diff/refs/heads/main/packages/protocol/schema.json#/$defs/chapter",
"id": "simple-h-function",
"title": "Let's Enable Rendering HTML Elements",
"fromDir": "10_minimum_example/015_package_architecture",
"toDir": "10_minimum_example/020_simple_h_function",
"docs": "https://book.chibivue.land/10-minimum-example/020-simple-h-function",
"changedFiles": [
{
"path": "examples/playground/src/main.ts",
"kind": "M",
},
{
"path": "packages/index.ts",
"kind": "M",
},
{
"path": "packages/runtime-core/apiCreateApp.ts",
"kind": "M",
},
{
"path": "packages/runtime-core/h.ts",
"kind": "U",
},
{
"path": "packages/runtime-core/index.ts",
"kind": "M",
},
{
"path": "packages/runtime-core/renderer.ts",
"kind": "M",
},
{
"path": "packages/runtime-core/vnode.ts",
"kind": "U",
},
{
"path": "packages/runtime-dom/index.ts",
"kind": "M",
},
{
"path": "packages/runtime-dom/modules/attrs.ts",
"kind": "U",
},
{
"path": "packages/runtime-dom/modules/events.ts",
"kind": "U",
},
{
"path": "packages/runtime-dom/nodeOps.ts",
"kind": "M",
},
{
"path": "packages/runtime-dom/patchProp.ts",
"kind": "U",
},
{
"path": "tests/e2e.spec.ts",
"kind": "M",
},
],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://raw.githubusercontent.com/RJiazhen/learn-by-diff/refs/heads/main/packages/protocol/schema.json#/$defs/chapter",
"id": "event-handler-and-attrs",
"title": "Let's work on supporting event handlers and attributes.",
"fromDir": "10_minimum_example/020_simple_h_function",
"toDir": "10_minimum_example/020_simple_h_function",
"docs": "https://book.chibivue.land/10-minimum-example/025-event-handler-and-attrs",
"changedFiles": [],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://raw.githubusercontent.com/RJiazhen/learn-by-diff/refs/heads/main/packages/protocol/schema.json#/$defs/chapter",
"id": "prerequisite-knowledge-for-the-reactivity-system",
"title": "Prerequisite Knowledge for the Reactivity System",
"fromDir": "10_minimum_example/020_simple_h_function",
"toDir": "10_minimum_example/020_simple_h_function",
"docs": "https://book.chibivue.land/10-minimum-example/030-prerequisite-knowledge-for-the-reactivity-system",
"changedFiles": [],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"$schema": "https://raw.githubusercontent.com/RJiazhen/learn-by-diff/refs/heads/main/packages/protocol/schema.json#/$defs/chapter",
"id": "try-implementing-a-minimum-reactivity-system",
"title": "Try Implementing a Small Reactivity System",
"fromDir": "10_minimum_example/020_simple_h_function",
"toDir": "10_minimum_example/030_reactive_system",
"docs": "https://book.chibivue.land/10-minimum-example/035-try-implementing-a-minimum-reactivity-system",
"changedFiles": [
{
"path": "examples/playground/src/main.ts",
"kind": "M",
},
{
"path": "packages/index.ts",
"kind": "M",
},
{
"path": "packages/reactivity/baseHandler.ts",
"kind": "U",
},
{
"path": "packages/reactivity/dep.ts",
"kind": "U",
},
{
"path": "packages/reactivity/effect.ts",
"kind": "U",
},
{
"path": "packages/reactivity/index.ts",
"kind": "U",
},
{
"path": "packages/reactivity/reactive.ts",
"kind": "U",
},
{
"path": "packages/runtime-core/apiCreateApp.ts",
"kind": "M",
},
{
"path": "packages/runtime-core/componentOptions.ts",
"kind": "M",
},
{
"path": "packages/runtime-core/renderer.ts",
"kind": "M",
},
{
"path": "tests/e2e.spec.ts",
"kind": "M",
},
],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "https://raw.githubusercontent.com/RJiazhen/learn-by-diff/refs/heads/main/packages/protocol/schema.json#/$defs/chapter",
"id": "minimum-virtual-dom",
"title": "A Minimal Virtual DOM",
"fromDir": "10_minimum_example/030_reactive_system",
"toDir": "10_minimum_example/040_vdom_system",
"docs": "https://book.chibivue.land/10-minimum-example/040-minimum-virtual-dom",
"changedFiles": [
{
"path": "packages/runtime-core/apiCreateApp.ts",
"kind": "M",
},
{
"path": "packages/runtime-core/h.ts",
"kind": "M",
},
{
"path": "packages/runtime-core/renderer.ts",
"kind": "M",
},
{
"path": "packages/runtime-core/vnode.ts",
"kind": "M",
},
{
"path": "packages/runtime-dom/nodeOps.ts",
"kind": "M",
},
{
"path": "tests/e2e.spec.ts",
"kind": "M",
},
],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"$schema": "https://raw.githubusercontent.com/RJiazhen/learn-by-diff/refs/heads/main/packages/protocol/schema.json#/$defs/chapter",
"id": "minimum-component",
"title": "Aspiring for Component-Oriented Development",
"fromDir": "10_minimum_example/040_vdom_system",
"toDir": "10_minimum_example/050_component_system",
"docs": "https://book.chibivue.land/10-minimum-example/050-minimum-component",
"changedFiles": [
{
"path": "examples/playground/src/main.ts",
"kind": "M",
},
{
"path": "packages/runtime-core/component.ts",
"kind": "M",
},
{
"path": "packages/runtime-core/h.ts",
"kind": "M",
},
{
"path": "packages/runtime-core/renderer.ts",
"kind": "M",
},
{
"path": "packages/runtime-core/vnode.ts",
"kind": "M",
},
{
"path": "packages/runtime-dom/nodeOps.ts",
"kind": "M",
},
{
"path": "tests/e2e.spec.ts",
"kind": "M",
},
],
}
Loading
Loading