Sha256: d390c03f36a60abec350b78eb952c2896e8572e479b6256107de628d31024ced

Contents?: true

Size: 840 Bytes

Versions: 3

Compression:

Stored size: 840 Bytes

Contents

require "aesthetics/rails/version"

module Aesthetics
  module Rails
		class Engine < ::Rails::Engine
      initializer 'aesthetics.assets.precompile' do |app|
        %w(stylesheets javascripts).each do |sub|
          app.config.assets.paths << root.join('assets', sub).to_s
        end
      end
    end
  end

    # Paths
    def gem_path
      @gem_path ||= File.expand_path '..', File.dirname(__FILE__)
    end

    def stylesheets_path
      File.join assets_path, 'stylesheets'
    end

    def javascripts_path
      File.join assets_path, 'javascripts'
    end

    def assets_path
      @assets_path ||= File.join gem_path, 'assets'
    end

  private

  def configure_sass
    require 'sass'

    ::Sass.load_paths << stylesheets_path

    ::Sass::Script::Number.precision = [10, ::Sass::Script::Number.precision].max
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aesthetics-rails-0.1.3.pre.alpha lib/aesthetics/rails.rb
aesthetics-rails-0.1.1.pre.alpha lib/aesthetics/rails.rb
aesthetics-rails-0.1.0.pre.alpha lib/aesthetics/rails.rb