Have www/build.sh use cargo run --bin roc-docs

This commit is contained in:
Richard Feldman 2022-05-08 22:02:06 -04:00
parent bd1f2aaf0b
commit 3a6e34c852
No known key found for this signature in database
GPG Key ID: 7E4127D1E4241798
2 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ edition = "2018"
# Having its own (extremely minimal) CLI means docs can be generated
# on a build server after building this crate from source, without
# having to install non-Rust dependencies (LLVM, Zig, wasm things, etc.)
# It gets called in www/build.sh via `cargo run --bin roc-docs`
[[bin]]
name = "roc-docs"
path = "src/main.rs"

View File

@ -50,7 +50,7 @@ BUILTINS_HOST_O=""
# We run the CLI with --no-default-features because that way we don't have the
# "llvm" feature and therefore don't depend on LLVM being installed on the
# system. (Netlify's build servers have Rust installed, but not LLVM.)
cargo run -p roc_cli --no-default-features docs compiler/builtins/roc/*.roc
cargo run --bin roc-docs compiler/builtins/roc/*.roc
mv generated-docs/*.* www/build # move all the .js, .css, etc. files to build/
mv generated-docs/ www/build/builtins # move all the folders to build/builtins/
popd