Sha256: 4b0fff7d5c5a48b5dfcae7b103f5979a41cc1132fe18dbc6f56778ce8e1c0f24
Contents?: true
Size: 1.3 KB
Versions: 9
Compression:
Stored size: 1.3 KB
Contents
module Embork::Sprockets::Frameworks def load_compass_framework(sprockets_environment) begin require 'compass' sprockets_environment.append_path Compass::Frameworks['compass'].stylesheets_directory Compass.configuration.images_path = File.join sprockets_environment.root, 'static', 'images' rescue LoadError => e (@logger ||= Embork::Logger.new(STDOUT, :simple)).error 'Compass gem is not installed.' @logger.info %{Add `gem 'compass'` to your Gemfile and run `bundle` to install it.} exit 1 end end def load_bootstrap_framework(sprockets_environment) base = nil begin require('compass') require('bootstrap-sass') base = File.join Compass::Frameworks['bootstrap'].path, 'vendor/assets' rescue LoadError => e begin require('bootstrap-sass') base = File.join(Gem::Specification.find_by_name('bootstrap-sass').gem_dir, 'vendor/assets') rescue LoadError => e (@logger ||= Embork::Logger.new(STDOUT, :simple)).error 'Compass gem is not installed.' @logger.info %{Add `gem 'bootstrap-sass'` to your Gemfile and run `bundle` to install it.} exit 1 end end %w(stylesheets javascripts fonts).each do |type| sprockets_environment.append_path File.join(base, type) end end end
Version data entries
9 entries across 9 versions & 1 rubygems