WIP refactor rerender render-v2

This commit is contained in:
Alejandro Alonso
2024-10-02 12:35:05 +02:00
parent 78fb938d16
commit 2184af6602
15 changed files with 31 additions and 30 deletions

View File

@@ -0,0 +1,11 @@
#!/bin/bash
mkdir -p ../../resources/public/js/render-v2/cpp
mkdir -p ../../src/app/render-v2/
# FIXME: This is a VERY HACKY way to set the correct `scriptDirectory` but
# I didn't find a better way yet.
PREAMBLE_LINES=`wc -l js/preamble.js | egrep -o [0-9]+`
POSTAMBLE_LINES=`wc -l js/postamble.js | egrep -o [0-9]+`
LINE_NUMBER=`echo "200 + ${PREAMBLE_LINES} + ${POSTAMBLE_LINES}" | bc | egrep -o [0-9]+`
sed "${LINE_NUMBER} i \ \ scriptDirectory += 'render-v2/cpp/';" out/render-v2.js > ../../src/app/render-v2/cpp.js
cp out/render-v2.wasm ../../resources/public/js/render-v2/cpp