From 8571468f1c7b79ee2b45d7e1d317523cdafabf88 Mon Sep 17 00:00:00 2001 From: Fedor Logachev Date: Wed, 11 Sep 2024 21:59:51 -0600 Subject: [PATCH] Update JS generation commands Its ugly. It should not be in the README.md. But it works and it fix the problem. --- js/README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/js/README.md b/js/README.md index e056f430..56d54a74 100644 --- a/js/README.md +++ b/js/README.md @@ -3,9 +3,16 @@ mq_js_bundle.js contains most common macroquad's dependencies JS code in one JS `mq_js_bundle.js` was made by: ```bash +#!/bin/bash + +function wrap_js { + echo "(function () {" >> mq_js_bundle.js + cat $1 >> mq_js_bundle.js + echo "}());" >> mq_js_bundle.js +} cat ../../miniquad/js/gl.js > mq_js_bundle.js -cat ../../quad-snd/js/audio.js >> mq_js_bundle.js -cat ../../sapp-jsutils/js/sapp_jsutils.js >> mq_js_bundle.js -cat ../../quad-net/js/quad-net.js >> mq_js_bundle.js -minify mq_js_bundle.js +wrap_js ../../quad-snd/js/audio.js +wrap_js ../../sapp-jsutils/js/sapp_jsutils.js +wrap_js ../../quad-net/js/quad-net.js +minify mq_js_bundle.js > mq_js_bundle2.js ```