Sha256: 59acbba8de527ac6ad46d8840d1ee797899daff935d27e05a9ac7bede829bedb

Contents?: true

Size: 760 Bytes

Versions: 2

Compression:

Stored size: 760 Bytes

Contents

LESS_INIT = <<-LESS unless defined?(LESS_INIT)
    # Enables support for Less template reloading for rack.
    # Store Less files by default within 'app/stylesheets/'
    # See http://github.com/kelredd/rack-less for more details.
    require 'rack/less'
    # optional - use as necessary
    Rack::Less.configure do |config|
      config.compress = true
      # config.cache = true
      # other configs ...
    end
    app.use Rack::Less,
      :root      => Padrino.root,
      :source    => 'app/stylesheets',
      :public    => 'public',
      :hosted_at => 'stylesheets'
LESS

def setup_stylesheet
  require_dependencies 'less'
  require_dependencies 'rack-less'
  initializer :less, LESS_INIT
  empty_directory destination_root('/app/stylesheets')
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
padrino-gen-0.10.7 lib/padrino-gen/generators/components/stylesheets/less.rb
padrino-gen-0.10.6 lib/padrino-gen/generators/components/stylesheets/less.rb