oranda dev
This command basically combined oranda build and oranda serve, with the added benefit of watching for changes
and recompiling automatically. When you launch, what happens is this:
- Oranda builds your site (unless you told it not to)
- Oranda launches a server similar to
oranda serve - Oranda starts watching its relevant files for changes, and will rerun the build process when something changes
Oranda's build can have a lot of side-effects (reading/writing files, but also talking to the GitHub API), and as such, we have to take care to only run the build process when relevant files change. These files are:
- Your project manifest files (
Cargo.toml,package.json) - Your oranda configuration file
- Any mdbook source files you may have
- Your readme, and additional files specified in the configuration
- Files immediately relevant to certain components oranda renders (funding, for example)
- Any other paths you give it using
--include-paths
This command also supports several options:
--portto set a custom port for the file server--config-pathto specify a custom path for your oranda config (but oranda will still look for anoranda-workspace.json) in your current directory).--no-first-buildto skip the first step mentioned above where oranda builds your site before starting the watch process-i,--include-pathsto specify custom paths for oranda to watch