bundle mq.js along with the code

This commit is contained in:
cool-mist
2025-08-22 20:18:43 +05:30
parent ab0c333935
commit 3a3c681899
3 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ build_web() {
return 1 return 1
fi fi
rm -rf ${TARGET_DIR} && mkdir -p ${TARGET_DIR} && mv ./target/wasm32-unknown-unknown/${BUILD_PROFILE}/${BINARY_NAME}.wasm ${TARGET_DIR}/${BINARY_NAME}.wasm && cp ./tools/web/index.html ${TARGET_DIR}/index.html rm -rf ${TARGET_DIR} && mkdir -p ${TARGET_DIR} && mv ./target/wasm32-unknown-unknown/${BUILD_PROFILE}/${BINARY_NAME}.wasm ${TARGET_DIR}/${BINARY_NAME}.wasm && cp ./tools/web/index.html ${TARGET_DIR}/index.html && cp ./tools/web/mq.js ${TARGET_DIR}/mq.js
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Failed to assemble the build in ${TARGET_DIR}" echo "Failed to assemble the build in ${TARGET_DIR}"
return 1 return 1
+1 -1
View File
@@ -21,7 +21,7 @@
</head> </head>
<body> <body>
<canvas id="glcanvas" tabindex='1'></canvas> <canvas id="glcanvas" tabindex='1'></canvas>
<script src="https://not-fl3.github.io/miniquad-samples/mq_js_bundle.js"></script> <script src="./mq.js"></script>
<script>load("sol_chess.wasm");</script> <!-- Your compiled WASM binary --> <script>load("sol_chess.wasm");</script> <!-- Your compiled WASM binary -->
</body> </body>
</html> </html>
+3
View File
File diff suppressed because one or more lines are too long