Project

imba-rails

0.0
No commit activity in last 3 years
No release in over 3 years
Rails integration for Imba
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0

Runtime

 Project Readme

Imba::Rails

Rails integration for the Imba language.

Usage

Write .imba files:

# in app/assets/javascripts/todo.imba
tag #app
    def awaken
        render
        self

    def render
        <self>
            <h1> "Hello Imba!"

def window.app
    #app

Include them together with the Imba runtime in application.js:

//= require imba
//= require todo

Make it all happen in the view:

<%= javascript_include_tag 'application' %>
...
<div id="app"></div>
<script>app()</script>

Installation

Add this line to your application's Gemfile:

gem 'imba-rails'

# You should also depend on a specific version of Imba:
gem 'imab-source', '~> 0.12.1'

And then execute:

$ bundle

Or install it yourself as:

$ gem install imba-rails

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/judofyr/imba-rails.

License

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