3 ms·
I've been doing this with singe file html pages that bundle all dependencies inline, no server necessary. It does put some restrictions on what you can do, sinc
by mstade 6y ago
I've been doing this with singe file html pages that bundle all dependencies inline, no server necessary. It does put some restrictions on what you can do, since local files are sandboxed pretty hard, but with all dependencies inlined (and with WebAssembly you can get pretty crazy, like embedding SQLite in an html file) you can do quite a lot.
Just the other week I made a little app that loads CSV files from a room booking system to create monthly reports, which was done manually by the sole employee of our housing association and took several hours – now it takes minutes.
It's been my go to way to create easily deployed rich GUI apps for the past year or so, and is pretty simple to build with a few shell scripts to put it all together. The resulting html files can be big, but they load really quite fast and since they're deployed on to a machine and not served over a network the size doesn't matter that much. It's also way less than an electron deployment anyway.
- erikw 6y agoWhat is the tooling and workflow you use for this? It's not something that had occurred to me, but now that you mention it, it seems like something I'd like to try. Edit: It looks like none of the major bundlers support this feature out of the box, but there is a project called in inliner that does exactly this: https://github.com/remy/inliner https://github.com/remy/inliner
- mstade 6y agoNothing fancy, just a few home grown shell scripts to essentially replace external dependencies in the html (e.g. script tags or link tags) with the contents of those files. There's no minifying, optimization, or building or anything. I only use vanilla js, css and html. The only exception to this is if I have anything that needs compiling to wasm, which essentially is just SQLite, but could be anything really. Because I only deploy these locally on desktops it's pretty much pointless to build/obfuscate/optimize anything for transport, it's so fast to load anyway since it's all off the local drive. Maybe I should write up a how-to or tidy up the workflow and publish, but it's really nothing fancy.