mirror of
https://github.com/google/comprehensive-rust.git
synced 2024-12-15 06:20:32 +02:00
e2c59ddbb5
Before we would run `mdbook test` using the current Markdown sources. This is subtly wrong: we publish the course using back-dated sources, so we should therefore also run the tests using the same sources (this ensures that the code snippets actually work). After this commit, all translatable content lives in exactly two directories: - `src/` - `third_party/` We need to restore both directories when testing and when publishing. This ensures consistency in the Markdown text and in the included source code. A new `.github/workflows/build.sh` script takes care of preparing the two directories according to the date in the PO file (if any). To ensure we can restore all of `third_party/` to an old commit, the non-changing `third_party/mdbook/book.js` file has been moved to `theme/book.js`. The file is generated by `mdbook init --theme`, making it suitable for modification by the user (us). Symlinks have been added to `third_party/mdbook/` to indicate that the files ultimately came from upstream.
34 lines
826 B
JSON
34 lines
826 B
JSON
{
|
|
"lineWidth": 80,
|
|
"json": {},
|
|
"markdown": {
|
|
"textWrap": "always"
|
|
},
|
|
"exec": {
|
|
"commands": [{
|
|
"command": "yapf3",
|
|
"exts": ["py"]
|
|
}, {
|
|
"command": "rustfmt --edition 2021",
|
|
"exts": ["rs"]
|
|
}, {
|
|
"command": "msgcat -",
|
|
"exts": ["po"]
|
|
}]
|
|
},
|
|
"excludes": [
|
|
"/book/",
|
|
"/theme/*.hbs",
|
|
"/theme/book.js",
|
|
"/third_party/",
|
|
"target/"
|
|
],
|
|
"plugins": [
|
|
"https://plugins.dprint.dev/exec-0.4.3.json@42343548b8022c99b1d750be6b894fe6b6c7ee25f72ae9f9082226dd2e515072",
|
|
"https://plugins.dprint.dev/json-0.17.4.wasm",
|
|
"https://plugins.dprint.dev/markdown-0.16.2.wasm",
|
|
"https://plugins.dprint.dev/toml-0.5.4.wasm",
|
|
"https://plugins.dprint.dev/prettier-0.27.0.json@3557a62b4507c55a47d8cde0683195b14d13c41dda66d0f0b0e111aed107e2fe"
|
|
]
|
|
}
|