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
npmpackage manager and make sure it's on the systemPATH.winget install --id OpenJS.NodeJS.LTSInstall Node.js manually or via a package manager like Homebrew
Install Node.js via your system's package manager.
-
python -m pip install build hatchlingpython -m pip install --user build hatchlingpython -m pip install --user build hatchling Clone the
t-doc/commonrepository (substituteUSERwith your username).hg clone https://USER@c-space.net/rc/hg/t-doc/common cd common
Checkout and activate the
mainbookmark.hg checkout mainRun the local server with the option
--version=devas the first argument torun.py. This installs thet-doc-commonpackage as editable into the virtual environment_venv/dev. You may also want to use the--debugoption to get full tracebacks.run.py --version=dev tdoc serve --debug./run.py --version=dev tdoc serve --debug./run.py --version=dev tdoc serve --debug
Upgrade#
Pull missing changesets from the
t-doc/commonrepository.hg pullUpdate to the branch head.
hg update --checkUpdate the generated files.
python -m build --no-isolation --wheelIf any Python dependencies need to be upgraded, delete the
_venv/devdirectory. It will be re-created when the local server is run the next time with--version=dev.Alternatively, the
t-doc-commonpackage metadata and any out-of-date dependencies can be updated in-place._venv\dev\Scripts\pip.exe install --upgrade --editable ._venv/dev/bin/pip install --upgrade --editable ._venv/dev/bin/pip install --upgrade --editable .