web: Pack client JS and add hamburger menu to web frontend#121
web: Pack client JS and add hamburger menu to web frontend#121binaryoverload merged 17 commits intodevfrom
Conversation
Minification today, bundling tomorrow!
Will need to deal with PJAX uhhhh later
I'm starting to get unsure how this is supposed to work at all
More readable
|
I'm on vacation for the couple days. @binaryoverload can you handle the review? |
binaryoverload
left a comment
There was a problem hiding this comment.
Looks pretty good! Just a couple of comments:
Added dev:build since the original code skips "tsc" which is faster
binaryoverload
left a comment
There was a problem hiding this comment.
Thanks for making those changes - looks good!
Just needs a npm run lint:fix :)
That's a vendored library :( Not sure why it's started failing now when it didn't before. |
|
Ah if it's a generated file then it'll be a case of adding ignores for those files! |
Since we have a bundler, might as well use it! Apparently previous work was (accidentally) using CJS format, which doesn't work on browser. Changing to IIFE means we don't get global scope anymore; which is needed for various places in the Juxt codebase where onclick= etc. are used. Eventually need to move to addEventListener, but for now explicitly export things by setting them on window. This allows us to stop vendoring PJAX and actually bundle it properly. Nice!
Since we no longer rely on the global scope for onclick=, re-enable full minification!
|
Since we have a bundler now anyway, I figured it would be better to use it for this rather than manually include the library. I also discovered a problem with the bundler (it was configured for Node/CommonJS) which I've also fixed. |
Resolves #104
Changes: