Sha256: ec12b7598b82fef9df0aefdd71998daaeb726be7ef1a2346e8f729f35f254d57

Contents?: true

Size: 932 Bytes

Versions: 14

Compression:

Stored size: 932 Bytes

Contents

#
# Code from twbs/bootstrap/sas
#
module MagicStylez
  class << self
    # Inspired by Kaminari
    def load!
      require 'bootstrap-sass/sass_functions'
      if rails?
        register_rails_engine
      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 fonts_path
      File.join assets_path, 'fonts'
    end

    def javascripts_path
      File.join assets_path, 'javascripts'
    end

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

    # Environment detection helpers
    def asset_pipeline?
      defined?(::Sprockets)
    end

    def rails?
      defined?(::Rails)
    end

    private

    def register_rails_engine
      require 'magic_stylez/engine'
      require 'autoprefixer-rails'
    end
  end
end

MagicStylez.load!

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
magic_stylez-0.0.0.19 lib/magic_stylez.rb
magic_stylez-0.0.0.13 lib/magic_stylez.rb
magic_stylez-0.0.0.12 lib/magic_stylez.rb
magic_stylez-0.0.0.11 lib/magic_stylez.rb
magic_stylez-0.0.0.10 lib/magic_stylez.rb
magic_stylez-0.0.0.9 lib/magic_stylez.rb
magic_stylez-0.0.0.8 lib/magic_stylez.rb
magic_stylez-0.0.0.7 lib/magic_stylez.rb
magic_stylez-0.0.0.6 lib/magic_stylez.rb
magic_stylez-0.0.0.5 lib/magic_stylez.rb
magic_stylez-0.0.0.4 lib/magic_stylez.rb
magic_stylez-0.0.0.3 lib/magic_stylez.rb
magic_stylez-0.0.0.2 lib/magic_stylez.rb
magic_stylez-0.0.0.1 lib/magic_stylez.rb