ruby2js
ruby2js copied to clipboard
An official Ruby-based configuration file format
Discussed in https://github.com/ruby2js/ruby2js/discussions/172
Originally posted by jaredcwhite August 16, 2022
There's a Ruby2JS CLI now but it only accepts CLI options for configuration. Separately there's also an informal rb2js.config.rb I sort of made up a while back. I think it's be good to come up with something official, maybe like Puma where there it looks for config/ruby2js.rb and accepts a nice little DSL for configuring. Just an example:
preset
filter :lit
autoimport :Toaster => "lib/toaster.js.rb"
autoimport [:DeclarativeActionsController, :TargetsController] => "@crystallized/controllers"
include_methods :class, :call