Sha256: e7b93c4ae48ac5832ee684b721c5abbe9c5bb8cec9e0f7cb3d642da18cda4bee

Contents?: true

Size: 780 Bytes

Versions: 12

Compression:

Stored size: 780 Bytes

Contents

module Purecss
  module Sass
    class << self
      def load!
        if defined?(::Rails)
          register_rails_engine
        elsif defined?(::Sprockets)
          register_sprockets
        end

        configure_sass
      end

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

      def stylesheets_path
        File.join(gem_path, 'vendor/assets/stylesheets')
      end

      private

        def configure_sass
          require 'sassc'

          ::SassC.load_paths << stylesheets_path
        end

        def register_rails_engine
          require 'purecss/sass/engine'
        end

        def register_sprockets
          Sprockets.append_path(stylesheets_path)
        end
    end
  end
end

Purecss::Sass.load!

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
purecss-sass-3.0.1 lib/purecss-sass.rb
purecss-sass-3.0.0 lib/purecss-sass.rb
purecss-sass-2.2.0 lib/purecss-sass.rb
purecss-sass-2.1.0 lib/purecss-sass.rb
purecss-sass-2.0.6 lib/purecss-sass.rb
purecss-sass-2.0.5 lib/purecss-sass.rb
purecss-sass-2.0.4 lib/purecss-sass.rb
purecss-sass-2.0.3 lib/purecss-sass.rb
purecss-sass-2.0.2 lib/purecss-sass.rb
purecss-sass-2.0.1 lib/purecss-sass.rb
purecss-sass-2.0.0 lib/purecss-sass.rb
purecss-sass-1.0.1.1 lib/purecss-sass.rb