зеркало из https://github.com/mozilla/treeherder.git
1.5 KiB
1.5 KiB
Common tasks
Serving the docs locally
The docs are built using MkDocs, which has a live-reloading development server, that makes working on the docs locally much easier.
To use this within the Docker environment, run:
docker-compose run -p 8000:8000 backend mkdocs serve -a 0.0.0.0:8000
Or if you would rather not use Docker, instead use poetry,run:
% pip install poetry
% poetry install
% poetry run mkdocs serve
**Note-**On Windows you might need to fallback python -m venv venv
or virtualenv
to manage your virtualenv if poetry
does not work for you.
In either case, the docs will then be available at: http://localhost:8000
Updating package.json
- Always use
yarn
to make changes, notnpm
, so thatyarn.lock
remains in sync. - Add new packages using
yarn add <PACKAGE>
(yarn.lock
will be automatically updated). - After changes to
package.json
useyarn install
to install them and automatically updateyarn.lock
. - For more details see the Yarn documentation.
Add a new Mercurial repository
To add a new repository, the following steps are needed:
- Append new repository information to the fixtures file located at:
treeherder/model/fixtures/repository.json
- Restart any running Django runserver/Celery processes.
For more information on adding a new GitHub repository, see Adding a GitHub repository.