Skip to content

Commit 8571468

Browse files
committed
Update JS generation commands
Its ugly. It should not be in the README.md. But it works and it fix the problem.
1 parent c940518 commit 8571468

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

js/README.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@ mq_js_bundle.js contains most common macroquad's dependencies JS code in one JS
33
`mq_js_bundle.js` was made by:
44

55
```bash
6+
#!/bin/bash
7+
8+
function wrap_js {
9+
echo "(function () {" >> mq_js_bundle.js
10+
cat $1 >> mq_js_bundle.js
11+
echo "}());" >> mq_js_bundle.js
12+
}
613
cat ../../miniquad/js/gl.js > mq_js_bundle.js
7-
cat ../../quad-snd/js/audio.js >> mq_js_bundle.js
8-
cat ../../sapp-jsutils/js/sapp_jsutils.js >> mq_js_bundle.js
9-
cat ../../quad-net/js/quad-net.js >> mq_js_bundle.js
10-
minify mq_js_bundle.js
14+
wrap_js ../../quad-snd/js/audio.js
15+
wrap_js ../../sapp-jsutils/js/sapp_jsutils.js
16+
wrap_js ../../quad-net/js/quad-net.js
17+
minify mq_js_bundle.js > mq_js_bundle2.js
1118
```

0 commit comments

Comments
 (0)