Refactored to use a build script

This commit is contained in:
justin committed 2025-07-13 15:32:59 -04:00
1 parent fe4b3c3e1b
commit eeb611b7af
7 files changed
+383 -330

No files matched your search

Executable
+35
View File
@@ -0,0 +1,35 @@
#!/bin/bash
set +e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
cd "$DIR/.."
# Build script to combine all source files into a single content.js
# Create the output file and start the IIFE
echo '(function() {' >content.js
echo '' >>content.js
# Add each external library first
for file in lib/*; do
cat "$file" >>content.js
echo "// === $file ===" >>content.js
echo '' >>content.js
echo '' >>content.js
done
# Add each source file in order
for file in src/*; do
echo "// === $file ===" >>content.js
cat "$file" >>content.js
echo '' >>content.js
echo '' >>content.js
done
echo 'main();' >>content.js
# Close the IIFE
echo '})();' >>content.js
echo "Built content.js from source files"