Sha256: 3030f235c4376434b63de34d26f4a031d54068004dbcfb688d57ddac008c55e1

Contents?: true

Size: 657 Bytes

Versions: 2

Compression:

Stored size: 657 Bytes

Contents

require 'stylus/tilt'
module Stylus
  ### Stylus Railtie
  #
  # `Railtie` responsible for injecting `stylus` inside the
  # Rails application and the `Sprockets` Asset Pipeline.
  class Railtie < ::Rails::Railtie

    config.app_generators.stylesheet_engine :stylus

    initializer :setup_stylus do |app|
      app.assets.register_engine '.styl', Tilt::StylusTemplate
    end

    # Includes the `Rails` asset load path into `stylus` so any
    # `.styl` file inside it can be imported by the `stylus` API.
    config.after_initialize do |app|
      Stylus.compress = app.config.assets.compress
      Stylus.paths.concat app.assets.paths
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stylus-0.2.2 lib/stylus/railtie.rb
stylus-0.2.1 lib/stylus/railtie.rb