Skip to content

yiyenene/kyubi

Repository files navigation

Kyubi

Supports settings of page specified assets load and precompile at Ruby on Rails.

Usage

In config/application.rb

require "kyubi/railtie"

In app/views/layout/application.html.erb

<%= kyubi_stylesheet_link_tag media: 'all' %>
<%= kyubi_javascript_include_tag 'data-turbolinks-track' => 'reload' %>

Assets

Kyubi expects app/assets/views directory has same structures with app/views directory.

app  
+-- assets  
    +-- stylesheets   
    +-- javascripts  
    +-- views  
        +-- top
            +-- shared.css
            +-- index.css  
            +-- index.js  
+-- views
    +-- top
        +-- index.html.erb

when top/index view rendering, index.css and index.js are loaded by kyubi tag helper.
shared is also loaded when execute same controller action.

Installation

Add this line to your application's Gemfile:

gem 'kyubi'

And then execute:

$ bundle

Or install it yourself as:

$ gem install kyubi

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published