Add pre-reqs and tasks for launching a live version of the docs site (#1808)
* Add pre-reqs and tasks for launching a live version of the docs site * disable spell-check on some files * Build all features and set 'docsrs' flag to enable docs related features in crates
This commit is contained in:
Родитель
2d5e159e30
Коммит
b4ecd85e99
|
@ -0,0 +1,11 @@
|
|||
FROM mcr.microsoft.com/devcontainers/rust:1-1-bullseye
|
||||
|
||||
USER vscode
|
||||
|
||||
# Install nightly toolchain to give access to nightly features for docs-site build.
|
||||
RUN rustup toolchain install nightly
|
||||
|
||||
# Install pre-requisite tools
|
||||
RUN cargo install \
|
||||
cargo-watch \
|
||||
http-server
|
|
@ -2,7 +2,9 @@
|
|||
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
|
||||
{
|
||||
"name": "Azure SDK for Rust",
|
||||
"image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile"
|
||||
},
|
||||
"onCreateCommand": ".devcontainer/oncreate",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/azure-cli:1": {},
|
||||
|
@ -20,4 +22,4 @@
|
|||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,11 +6,13 @@
|
|||
"**/test-resources.bicep",
|
||||
"**/test-resources.json",
|
||||
".devcontainer/devcontainer.json",
|
||||
".devcontainer/Dockerfile",
|
||||
".devcontainer/oncreate",
|
||||
".github/CODEOWNERS",
|
||||
".github/dependabot.yml",
|
||||
".vscode/cspell.json",
|
||||
".vscode/extensions.json",
|
||||
".vscode/tasks.json",
|
||||
"NOTICE.txt",
|
||||
"eng/",
|
||||
"*.dict.txt",
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Start docs site (requires nightly)",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"command": "cargo",
|
||||
"args": [
|
||||
"watch",
|
||||
"-s",
|
||||
"RUSTDOCFLAGS=\"--cfg=docsrs --enable-index-page -Z unstable-options\" cargo +nightly doc --all-features --workspace --no-deps",
|
||||
"-s",
|
||||
"http-server --index --port 8080 ./target/doc"
|
||||
],
|
||||
"isBackground": true,
|
||||
"problemMatcher": [
|
||||
"$rustc"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Загрузка…
Ссылка в новой задаче