New translations dependency-commands.mdx (Russian)

[ci skip]
This commit is contained in:
2026-07-06 02:20:59 +08:00
parent d44c62da6d
commit eee70da275

View File

@@ -1,47 +1,47 @@
--- ---
sidebar_label: Dependency commands (add, tree) sidebar_label: Команды зависимостей (add, tree)
--- ---
# Dependency Commands # Команды зависимостей
## `dcr add \<name> [source]` ## `dcr add \<name> [source]`
Adds a dependency to `dcr.toml`. Добавляет зависимость в `dcr.toml`.
```bash ```bash
dcr add fmt # registry lookup dcr add fmt # поиск в реестре
dcr add mylib ../path/to/lib # path as source dcr add mylib ../path/to/lib # путь как источник
dcr add mylib path:./lib # explicit path prefix dcr add mylib path:./lib # явный префикс пути
dcr add mylib git:https://github.com/user/repo # explicit git prefix dcr add mylib git:https://github.com/user/repo # явный префикс git
dcr add mylib github:user/repo # GitHub shorthand dcr add mylib github:user/repo # сокращённая запись GitHub
dcr add mylib gitlab:user/repo # GitLab shorthand dcr add mylib gitlab:user/repo # сокращённая запись GitLab
``` ```
Source prefixes: Префиксы источника:
* `path:` — local path * `path:` — локальный путь
* `git:` — generic git URL * `git:` — URL адрес git-репозитория
* `github:` — expands to `https://github.com/\<user>/\<repo>` * `github:` — расширение `https://github.com/\<user>/\<repo>`
* `gitlab:` — expands to `https://gitlab.com/\<user>/\<repo>` * `gitlab:` — расширение `https://gitlab.com/\<user>/\<repo>`
* `http://` / `https://` / `git@` — full URL * `http://` / `https://` / `git@` — полный URL
Flags: Флаги:
* `--branch \<name>` — git branch * `--branch \<name>` — git ветка
* `--tag \<name>` — git tag * `--tag \<name>` — git tag
* `--rev \<hash>` — git commit * `--rev \<hash>` — git commit
If source is omitted — DCR searches connected registries. Если источник не указан — DCR выполняет поиск в подключенных реестрах.
## `dcr tree` ## `dcr tree`
Displays the project dependency tree. Показывает дерево зависимостей проекта.
```bash ```bash
dcr tree dcr tree
``` ```
Example output: Пример вывода:
``` ```
my-app v0.1.0 my-app v0.1.0
@@ -50,4 +50,4 @@ my-app v0.1.0
└── catch2 (registry) └── catch2 (registry)
``` ```
For path dependencies, recursively shows their own dependencies (from their `dcr.toml`). В случае path зависимостей, рекурсивно отображает их собственные зависимости (из файла `dcr.toml`).