[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-talk
Subject: Re: Optimizing Opal output for size
From: hmdne <hmdne () airmail ! cc>
Date: 2021-11-27 1:03:29
Message-ID: d49fb633-f513-7852-aa11-50931d5cd877 () airmail ! cc
[Download RAW message or body]
Well - it can generate JS on server, but also on client (because it's
able to compile itself).
In general it's not tied to anything. Can be used as a CLI tool,
integrated with Sprockets or Rails. Or even directly with Tilt or Rack.
Or you can also generate JavaScript using a rake task.
It's compatible with a browser, which is the primary target, but is also
compatible with NodeJS, GJS, QuickJS, to name a few. You can use
`opal-repl` CLI tool (by default on NodeJS) which is similar to `irb`
but runs on Opal instead of MRI.
I made a zoo of integrations here:
https://github.com/opal/opal-browser/tree/master/examples/integrations
(I write a production app usingdynamic-roda-roda-sprockets
<https://github.com/opal/opal-browser/tree/master/examples/integrations/dynamic-roda-roda-sprockets>)
For Rails there is https://github.com/opal/opal-rails/
There is a big integration with Rails & React available:
https://hyperstack.org/
In general our aim is to allow you to write a complex website with not a
single line of JS.
On 11/27/21 00:56, Henrik Y wrote:
> This project looks interesting.
> Can I understand it generates JS on server end by dynamic?
> Does it have any requirement to web server software?
>
> Thanks.
>
> On 2021/11/25 8:32 下午, hmdne wrote:
>> I wrote an article on the Opal blog. It touches some parts on how
>> Opal transforms Ruby to JavaScript, if anyone would be interested :D.
>> We touch low-level interfaces quite a lot, so it may not be very
>> obvious to people new to this approach, but may serve as a some
>> introduction to Opal:
>>
>> https://opalrb.com/blog/2021/11/24/optimizing-opal-output-for-size/
>>
>>
>> Unsubscribe:
>> <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>
> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic