setup-exercode-course-repository

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Set up an Exercode course repository

配置 Exercode 课程仓库

Prepare the repository tooling required to author and evaluate Exercode course content. Do not create or modify learning content.
准备编写和评估 Exercode 课程内容所需的仓库工具。不要创建或修改学习内容。

Tracked tooling setup

将工具配置纳入版本控制

The repository tracks its tooling instead of ignoring it.
  • package.json
    contains
    private: true
    ,
    type: "module"
    , and the repository name.
  • @exercode/problem-utils
    is an exact production dependency at its latest published version.
  • bun.lock
    is tracked.
  • Bun and Node.js are managed by mise with exact versions. Preserve an existing
    mise.toml
    ,
    .mise.toml
    , or
    .tool-versions
    ; when none exists, create
    .tool-versions
    .
  • .gitignore
    includes
    node_modules/
    ,
    .DS_Store
    , and
    .tmp/
    . It does not ignore
    package.json
    or
    bun.lock
    .
  • Preserve compatible existing runtime versions, tools, dependencies, and scripts. Do not replace an existing mise or package setup wholesale.
仓库应跟踪其工具配置,而不是将其忽略。
  • package.json
    包含
    private: true
    、
    type: "module"
    和仓库名称。
  • @exercode/problem-utils
    是固定精确版本的生产依赖,应使用最新已发布版本。
  • bun.lock
    应纳入版本控制。
  • Bun 和 Node.js 由 mise 管理,并固定为精确版本。保留现有的
    mise.toml
    、
    .mise.toml
    或
    .tool-versions
    ;如果这些文件均不存在,则创建
    .tool-versions
    。
  • .gitignore
    包含
    node_modules/
    、
    .DS_Store
    和
    .tmp/
    。不得忽略
    package.json
    或
    bun.lock
    。
  • 保留兼容的现有运行时版本、工具、依赖和脚本。不要整体替换现有的 mise 或 package 配置。

Workflow

工作流

  1. Read the repository instructions and inspect only the tracked root tooling files, including
    mise.toml
    ,
    .mise.toml
    , and
    .tool-versions
    when present.
  2. Keep the repository's existing mise format. Ensure it pins exact Bun and Node.js versions, preserving compatible exact versions and every unrelated tool. If multiple mise files exist, do not duplicate a tool already declared in any of them; add missing tools to an existing TOML config. If none exists, create
    .tool-versions
    with the exact current stable Bun version and current LTS Node.js version.
  3. If a mise TOML config is present, run
    mise trust --yes
    . Run
    mise install
    , then use the installed
    bun
    command normally for the remaining setup.
  4. Create or update
    package.json
    , then run
    bun add --exact @exercode/problem-utils@latest
    so
    package.json
    and
    bun.lock
    agree.
  5. Ensure
    .gitignore
    contains the required tooling entries without removing compatible existing entries.
  6. Do not create, modify, move, validate, or evaluate any course, lecture, material, problem, contest, asset, or other learning-content file.
  1. 阅读仓库说明,并仅检查已纳入版本控制的根目录工具配置文件,包括存在时的
    mise.toml
    、
    .mise.toml
    和
    .tool-versions
    。
  2. 保持仓库现有的 mise 配置格式。确保其固定了精确的 Bun 和 Node.js 版本,同时保留兼容的精确版本及所有无关工具。如果存在多个 mise 文件,不要重复声明任何文件中已有的工具;将缺失的工具添加到现有的 TOML 配置中。如果不存在任何 mise 文件,则创建
    .tool-versions
    ,并写入当前稳定版 Bun 和当前 LTS 版 Node.js 的精确版本。
  3. 如果存在 mise TOML 配置,运行
    mise trust --yes
    。然后运行
    mise install
    ,并正常使用已安装的
    bun
    命令完成其余配置。
  4. 创建或更新
    package.json
    ,然后运行
    bun add --exact @exercode/problem-utils@latest
    ,确保
    package.json
    与
    bun.lock
    保持一致。
  5. 确保
    .gitignore
    包含必需的工具配置条目,同时不删除兼容的现有条目。
  6. 不要创建、修改、移动、验证或评估任何课程、讲义、材料、题目、竞赛、资源或其他学习内容文件。