aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/dupre-revised.json
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-09 05:00:53 -0500
committerCraig Jennings <c@cjennings.net>2026-06-09 05:00:53 -0500
commit1908fc3d0e7069aaac2757c4ef9e0eafd4ae2b57 (patch)
treeeee82a696ba187a851fbdd6a73876dcf98504684 /scripts/theme-studio/dupre-revised.json
parent216fd303eb94a93af807930165f94950d1257e0c (diff)
downloaddotemacs-1908fc3d0e7069aaac2757c4ef9e0eafd4ae2b57.tar.gz
dotemacs-1908fc3d0e7069aaac2757c4ef9e0eafd4ae2b57.zip
refactor(theme-studio): extract CSS and JS to files, inline at generate time
generate.py was 1378 lines, ~1300 of them a single triple-quoted string holding the whole app. Moved the <style> block to styles.css and the <script> body to app.js, and generate.py now inlines both through placeholders the same way it already inlines colormath.js, then fills the data placeholders. It drops to ~500 lines (the remaining bulk is the package face-data dicts, a later stage). The generated page is byte-identical to before — every hash gate, the node suite, the spliced-script parse, and the new #locktest stay green. Two integrity tests guard the splice: styles.css inlines verbatim, and app.js reaches the page exactly as fill_data renders it. Both go red if the splice wiring is dropped. Living in real files instead of a Python string kills the backslash-doubling bug class (str.replace is literal, so escapes survive), gives the CSS and JS real editor tooling, and opens the app logic to unit testing — the point of the whole refactor.
Diffstat (limited to 'scripts/theme-studio/dupre-revised.json')
0 files changed, 0 insertions, 0 deletions