Skip to content

Commit

Permalink
Basic Bundle Script + TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
Its-its committed Dec 20, 2022
1 parent 7d08459 commit 1291f1f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/backend/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ use crate::Result;

static PUBLIC_DIR: Dir = include_dir!("$CARGO_MANIFEST_DIR../../../app/public");

// TODO: Use a virtual directory?

pub async fn export() -> Result<()> {
std::fs::create_dir_all("./app/public")?;

Expand Down
9 changes: 9 additions & 0 deletions scripts/bundle.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cd %~dp0..\crates\frontend

trunk build --release --public-url "/dist" -d "../../app/public/dist"

cd %~dp0..

cargo build --bin backend-bundled --release --features=bundled

echo Backend Bundle Built in target/release

0 comments on commit 1291f1f

Please sign in to comment.