Lurker News

Comments (242) 68 threads

Earlier comments
qwertygnu#
ha, I'm working on a dev-side version similar to this (mostly just for me, but hopefully publishable). I opted for an entirely pre-deplopyment build tool, where you just put

in your HTML, run the build and it outputs the filled in file somewhere else. I know its functionality is very similar to many web frameworks (e.g. React, handlebars) but it does one thing.
Alifatisk1 reply#
Kind of impressive that the installation script was that small.
turnsout#
That’s not the installation script, it’s the entire “framework!”
mofosyne#
Oh, if this snippet is just a search and replacer... would it be possible for this to be a preprocessor as well? Would allow for noJS websites.
hiccuphippo1 reply#
I think you can use null instead of ':not(*)' in the query selector, if only to make it a bit shorter and maybe a bit faster.
Kalabasa#
Nice, it works! I was a bit scared here because the querySelector() MDN docs say

> A string containing one or more selectors to match. This string must be a valid CSS selector string; if it isn't, a SyntaxError exception is thrown.
I'll test it out. If this works good, we shave off 5 bytes towards a 176-byte snippet!

Load more comments