summaryrefslogtreecommitdiff
path: root/src/chat.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/chat.rs')
-rw-r--r--src/chat.rs24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/chat.rs b/src/chat.rs
index be852d5..0739f22 100644
--- a/src/chat.rs
+++ b/src/chat.rs
@@ -50,6 +50,7 @@ pub(crate) fn environment(
}
pub(crate) fn build(project: &Project) -> Result<()> {
+ process::run(project.command("sh")?.arg("infra/chat/build-typescript.sh"))?;
process::run(project.command("sh")?.arg("infra/chat/build-native.sh"))?;
let wasm_build = if project
.root
@@ -79,7 +80,18 @@ pub(crate) fn package(project: &Project) -> Result<()> {
),
("var/build/chat-source.tar.gz", "SOURCE.tar.gz"),
("infra/containers/chat/Containerfile", "Containerfile"),
- ("crates/chat-crypto/browser/wasi.mjs", "wasi.mjs"),
+ (
+ "var/build/typescript/crates/chat-crypto/browser/wasi.js",
+ "wasi.mjs",
+ ),
+ (
+ "var/build/typescript/crates/chat-server/web/app.js",
+ "web/app.js",
+ ),
+ (
+ "var/build/typescript/crates/chat-server/web/worker.js",
+ "web/worker.js",
+ ),
("web/THIRD-PARTY-LICENSES.html", "THIRD-PARTY-LICENSES.html"),
("docs/CHAT-APPLICATION.txt", "CHAT-APPLICATION.txt"),
("docs/CHAT-PRODUCTION.txt", "CHAT-PRODUCTION.txt"),
@@ -87,10 +99,12 @@ pub(crate) fn package(project: &Project) -> Result<()> {
] {
files::copy_tree(&project.root.join(source), &directory.join(target))?;
}
- files::copy_tree(
- &project.root.join("crates/chat-server/web"),
- &directory.join("web"),
- )?;
+ for name in ["index.html", "style.css", "javascript.html"] {
+ files::copy_tree(
+ &project.root.join("crates/chat-server/web").join(name),
+ &directory.join("web").join(name),
+ )?;
+ }
Ok(())
}