RubyJS-Vite
filipvrba.github.io
filipvrba.github.io
"Since the Vite tool is a secondary feature of the RubyJS tool, it is appropriate to refer to the combined tool as RubyJS-Vite"
I wrote some PoCs with Opal[1] that felt pretty good to write, but the overhead was rough (this was many years ago so things might be different now) and I never really felt like I didn't have to know about or care about the underlying javascript. I tend to discard leaky abstractions as I feel they often add more complexity than they were meant to cover in the first place.
Has anybody used this or Opal or anything else? What is the state of "write your frontend in Ruby" nowadays?
Also packages are served via CDN. There is no tree shaking. Rails got rid of the whole bundling step.
I use Ruby.wasm with my own patch. [1][2] You can use the Javascript API and the syntax is a joy. I used it to make an electron app with videoplayer.[3] I also ported the rubykoans[4]
Lots of ruby.wasm talks at rubykaigi next month.
[1] https://github.com/largo/ruby.wasm
[2] https://github.com/largo/ruby.wasm-quickstart.
Both! I needed something like JSX, and I found Rux [1] but I had some issues with it, and then I found syntax_tree-haml [2] which gave me an AST that I could transform into Ruby. This is what the transformation looks like: https://gist.github.com/aalin/c0e4b0360a1f84d0283149fe4b2ce6...
I have always liked Haml because it's compact and easy to read.
It's always so jarring when you land on a page like this, read the quick blurb, and then have to look around to see where you need to click to read more entry-level content but without clicking too deeply into API docs.