You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplify project commands using cargo xtask (#2753)
We are already using `cargo xtask install-tools` to install the
project's tools, and `cargo xtask web-tests` to run the js tests. In
this PR we provide support for the various `mdbook` commands
(`test`,`serve`, and `build`) with `cargo xtask` commands. This provides
a uniform interface for running tasks in the project. Additionally it
allows these commands to work from within any dirrectory (previously
you'd need to navigate to the workspace root in order to run say `mdbook
build`).
Additionally we're improving the xtask code by making use of `Clap`
enums to handle validation of the possible tasks to run via xtask (this
closes#2741 ).
---------
Co-authored-by: Eric Githinji <[email protected]>
|`cargo xtask install-tools`| Install all the tools the project depends on. |
81
+
|`cargo xtask serve`| Start a web server with the course. You'll find the content on http://localhost:3000.|
82
+
|`cargo xtask rust-tests`| Test the included Rust snippets. |
83
+
|`cargo xtask web-tests`| Run the web driver tests in the tests directory. |
84
+
|`cargo xtask build`| Create a static version of the course in the `book/` directory. Note that you have to separately build and zip exercises and add them to book/html. To build any of the translated versions of the course, run MDBOOK_BOOK__LANGUAGE=xx mdbook build -d book/xx where xx is the ISO 639 language code (e.g. da for the Danish translation). [TRANSLATIONS.md](TRANSLATIONS.md) contains further instructions.|
96
85
97
86
> **Note** On Windows, you need to enable symlinks
98
87
> (`git config --global core.symlinks true`) and Developer Mode.
0 commit comments