Reactive dom programming in ruby, Vue.js inspired
Go to file
Torsten 654b989e90 fix the sending logic 2023-02-08 22:49:47 +02:00
app fixed, opal helper was not loaded, why is wip 2023-02-08 15:38:00 +02:00
config get the data to work with active_yaml 2023-02-08 11:55:44 +02:00
dummy fix the sending logic 2023-02-08 22:49:47 +02:00
lib fixed, opal helper was not loaded, why is wip 2023-02-08 15:38:00 +02:00
opal fix the sending logic 2023-02-08 22:49:47 +02:00
test make own dummy, less confusing what is gem/engine and what is app 2023-02-08 17:18:57 +02:00
.gitignore rewrite eval as send, removes parser 2023-02-08 20:03:20 +02:00
MIT-LICENSE rails new plugin mountable 2023-02-08 11:01:53 +02:00
README.md make own dummy, less confusing what is gem/engine and what is app 2023-02-08 17:18:57 +02:00
Rakefile rails new plugin mountable 2023-02-08 11:01:53 +02:00
vue_r.gemspec fix gemspec 2023-02-08 11:16:07 +02:00

README.md

VueR

(pronounced viewer)

VueR is a Vue.js inspired reactive frontend framework in ruby. It allows for the same kind of declaritive change management as vue, albeit in smaller scope. Many vue-like features work, and work continues, but the current scope is personal, so it's not meant as a vue.js replacement.

Usage

The usage is very close to the original, with off course ruby style. This means currently working are:

  • reactive attributes
  • reactive text
  • class based data
  • class based method
  • event dispatch to methods

The current and supported use is for making rails pages dynamic. An application is defined by deriving from a base class, and can be "mounted" on an element.

There is a syntax to define Event handlers which are methods on the application. Methods change the data. And any attributes or text that is declared as part of the html will be updated automatically if needed.

The wiki has more detailed descriptions

Installation

Installation is straightforward by including the gem and bundling

You can have a main js entry point, or many, it depends a bit. You can also read the opal-rails to get a feel for how to work with ruby in the frontend.

I use haml, so the usage is then:

  • add the requires to the application.js
  • write the application inside the haml template using :opal filter

The wiki has more details on how to use VueR from Haml or Erb

Contributing

Ask

License

The gem is available as open source under the terms of the MIT License.