Sha256: ea8facaff71c2eb0bf90e60b97ba0109ebab190d434a1d5abcb87ebbf9206cd7
Contents?: true
Size: 1.16 KB
Versions: 146
Compression:
Stored size: 1.16 KB
Contents
# Compact function pulled from compass require 'sass' module Sass::Script::Functions module CustomSassExtensions def compact(*args) sep = :comma if args.size == 1 && args.first.is_a?(Sass::Script::List) args = args.first.value sep = args.first.separator end Sass::Script::List.new(args.reject{|a| !a.to_bool}, sep) end end include CustomSassExtensions end module Sprockets class AssetAttributes def search_paths paths = [pathname.to_s] path_without_extensions = extensions.inject(pathname) { |p, ext| p.sub(ext, '') } # optimization: component.json can only be nested one level deep if !path_without_extensions.to_s.index('/') paths << path_without_extensions.join("component.json").to_s end if pathname.basename(extensions.join).to_s != 'index' paths << path_without_extensions.join("index#{extensions.join}").to_s end if paths[0] !~ /\/assets\/(js|css|img)\// and paths[0] =~ /^(\/?[^\/]+)(\/.+)$/ paths << $1 + '/assets/css' +$2 paths << $1 + '/assets/js' +$2 paths << $1 + '/assets/img' +$2 end paths end end end
Version data entries
146 entries across 146 versions & 2 rubygems