diff --git a/frontend/apps/editor3d/tsconfig.json b/frontend/apps/editor3d/tsconfig.json index 8381cec046..c082987f9b 100644 --- a/frontend/apps/editor3d/tsconfig.json +++ b/frontend/apps/editor3d/tsconfig.json @@ -33,6 +33,9 @@ "noEmit": true }, "references": [ + { + "path": "../../libs/tauri-api" + }, { "path": "../../libs/components/lightbox-modal" }, diff --git a/script/artcraft/unix_build.sh b/script/artcraft/unix_build.sh new file mode 100755 index 0000000000..9678967b6d --- /dev/null +++ b/script/artcraft/unix_build.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# This works on Linux and MacOS to build production Artcraft + +set -euxo pipefail + +echo "Building production Artcraft..." +echo "" + +root_dir=$(pwd) +frontend_path="${root_dir}/frontend" +rust_crate_path="${root_dir}/crates/desktop/artcraft" + +# The tauri dev server integration is super annoying: It eats ctrl-c interrupts, +# it decoheres the and corrupts terminal output, and it's slow. This configuration +# allows us to start without it. Simply launch `nx` and the dev server as a separate +# process and leave tauri out of the loop +config_path="${rust_crate_path}/tauri.artcraft_3d.no_dev.conf.toml" + +pushd "${frontend_path}" || exit + +npm install + +popd || exit + +export TAURI_FRONTEND_PATH="${frontend_path}" +export TAURI_APP_PATH="${rust_crate_path}" +export VITE_ENVIRONMENT_TYPE="production" + +cargo tauri build --config "${config_path}" + +echo "Done!" diff --git a/script/artcraft/unix_frontend_dev.sh b/script/artcraft/unix_frontend_dev.sh index e3e10ce697..d374feff44 100755 --- a/script/artcraft/unix_frontend_dev.sh +++ b/script/artcraft/unix_frontend_dev.sh @@ -22,6 +22,8 @@ pushd "${frontend_path}" || exit npm install +export VITE_ENVIRONMENT_TYPE="production" + nx dev editor3d popd || exit