Development

Contents

Development#

This page describes how to set up t-doc for development. It isn't necessary for creating and editing documents.

Install#

  • Install the required packages for your system.

  • Install Node.js, include the npm package manager and make sure it's on the system PATH.

    winget install --id OpenJS.NodeJS.LTS
    

    Install Node.js manually or via a package manager like Homebrew

    Install Node.js via your system's package manager.

  • Install the build, hatchling and uv packages.

    python -m pip install build hatchling uv
    
    python -m pip install --user build hatchling uv
    
    python -m pip install --user build hatchling uv
    
  • Clone the common repository.

    hg clone -u main https://rc.t-doc.org/hg/common
    cd common
    
  • Run the local server as usual. This installs the t-doc-common package as editable into the virtual environment _venv/dev.

Upgrade#

  • Pull missing changesets from the common repository.

    hg pull
    
  • Update to the branch head.

    hg update --check
    
  • Update the generated files.

    uv build
    
  • If any Python dependencies need to be upgraded, delete the _venv/dev directory. It will be re-created when the local server is run the next time.