On Mon Sep 9, 2024 at 9:35 AM CEST, Jonathan Carter wrote:
I went with libjs-htmx, it's now in unstable.
Wow, that was quick!
This installs the htmx binary to: /usr/share/javascript/htmx/htmx.min.js.gzI'm not an expert when it comes to JavaScript (and that's in part why I like htmx), and know even less about JavaScript policies in Debian. But, wouldn't installing a gzipped file create issues? Can I directly include it into a browser?Yes, browsers support gz decompression, and the decompression doesn't cause any noticeable overhead.
I'm of course aware of that :)What I meant is that browsers support gzip decompression only as part as the HTTP spec, and I feared that it wouldn't be possible to directly include the js file without using a webserver, with something like:
<script src="/usr/share/javascript/htmx/htmx.min.js.gz"></script> And, after checking, that's indeed not possible.Could you please ship both a compressed and an uncompressed version of the file? libjs-jquery does this, while libjs-highlight-js only ships uncompressed files:
$ dpkg --listfiles libjs-jquery | grep javascript/ /usr/share/javascript/jquery /usr/share/javascript/jquery/jquery.js /usr/share/javascript/jquery/jquery.min.js /usr/share/javascript/jquery/jquery.min.js.brotli /usr/share/javascript/jquery/jquery.min.js.gz /usr/share/javascript/jquery/jquery.min.map /usr/share/javascript/jquery/jquery.min.map.brotli /usr/share/javascript/jquery/jquery.min.map.gz $ dpkg --listfiles libjs-highlight.js | grep javascript/ | grep -v styles /usr/share/javascript/highlight.js /usr/share/javascript/highlight.js/highlight.js /usr/share/javascript/highlight.js/highlight.min.js Thanks! Bye :)
signature.asc
Description: PGP signature