Skip to content

Commit

Permalink
Allow several bin-related settings to be set via env var (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpalmer authored Jul 9, 2024
1 parent fd81124 commit cf24879
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Here, the latter is referred to as _target-triple_.
```toml
# Sets the name of the binary target used.
#
# Optional, only necessary if the bin-package defines more than one target
# Optional, only necessary if the bin-package defines more than one target. Can also be set with the LEPTOS_BIN_TARGET=name env var
bin-target = "my-bin-name"

# Enables additional file hashes on outputted css, js, and wasm files
Expand Down Expand Up @@ -205,12 +205,12 @@ lib-profile-dev = "my-debug-profile"
separate-front-target-dir = true

# Pass additional parameters to the cargo process compiling to WASM
#
#
# Optional. No default
lib-cargo-args = ["--timings"]

# Pass additional parameters to the cargo process to build the server
#
#
# Optional. No default
bin-cargo-args = ["--timings"]

Expand Down
2 changes: 2 additions & 0 deletions src/config/dotenvs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ fn overlay(conf: &mut ProjectConfig, envs: impl Iterator<Item = (String, String)
"LEPTOS_HASH_FILES" => conf.hash_files = val.parse()?,
"LEPTOS_HASH_FILE_NAME" => conf.hash_file_name = Some(val.parse()?),
"LEPTOS_BROWSERQUERY" => conf.browserquery = val,
"LEPTOS_BIN_EXE_NAME" => conf.bin_exe_name = Some(val),
"LEPTOS_BIN_TARGET" => conf.bin_target = val,
"LEPTOS_BIN_TARGET_TRIPLE" => conf.bin_target_triple = Some(val),
"LEPTOS_BIN_TARGET_DIR" => conf.bin_target_dir = Some(val),
"LEPTOS_BIN_CARGO_COMMAND" => conf.bin_cargo_command = Some(val),
Expand Down

0 comments on commit cf24879

Please sign in to comment.