Used internal build tooling to pack index
gitea/double-pendulum/pipeline/head This commit looks good
gitea/double-pendulum/pipeline/head This commit looks good
This commit is contained in:
Vendored
+1
-2
@@ -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/'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user