Skip to content

dariocravero/padrino-sprockets

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Padrino::Sprockets: Integrate Sprockets with Padrino

Installation

Install from RubyGems:

$ gem install padrino-sprockets

Or include it in your project's Gemfile with Bundler:

gem 'padrino-sprockets', :require => "padrino/sprockets"

Usage

Place your assets under these paths:

app/assets/javascripts
app/assets/images
app/assets/stylesheets

Regsiter sprockets in your application:

class Redstore < Padrino::Application
  register Padrino::Sprockets
  sprockets  # :url => 'assets', :root => app.root
end

Now you can access the assets as follows:

#  visit /assets/application.js
will find assets under these paths:
 => app/assets/javascripts/application.js
  => app/assets/javascripts/application.js.coffee
   => app/assets/javascripts/application.js.erb

For more documentation about sprockets, please check Sprockets

Helpers Usage

sprockets

 :root =>  'asset root' # default is app.root
 :url => 'assets'  # default map url, location, default is 'assets'

About

Integrate sprockets with padrion

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%