Project

kyubi

0.0
No commit activity in last 3 years
No release in over 3 years
can load stylesheet and javascript file from assets/views folder that have same structures with app/views folder.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 5.1.4
 Project Readme

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.