Used internal build tooling to pack index
gitea/double-pendulum/pipeline/head This commit looks good

This commit is contained in:
Philippe Zwietering
2026-09-08 14:57:18 +02:00
parent 0630e77b17
commit 4e7260ff92
3 changed files with 11 additions and 3 deletions
Vendored
+1 -2
View File
@@ -8,8 +8,7 @@ pipeline {
}
stage('Build') {
steps {
sh 'wasm-pack build --target web --out-dir /var/www/zwietering.eu/projects/double-pendulum/pkg'
sh 'cp ./index.html /var/www/zwietering.eu/projects/double-pendulum'
sh 'wasm-pack build --target web --out-dir /var/www/zwietering.eu/projects/double-pendulum/'
}
}
}
+9
View File
@@ -0,0 +1,9 @@
use std::fs;
fn main() {
println!("cargo:rerun-if-changed=index.html");
if let Err(e) = fs::copy("index.html", "pkg/index.html") {
eprintln!("Error: Couldn't copy index.html: {}", e);
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
</head>
<body>
<script type="module">
import init from './pkg/double_pendulum_wasm.js';
import init from './double_pendulum_wasm.js';
async function run() {
await init();