Sha256: a001f9aa19051cf5a00c864d0a5dac14aa58e3d92c974503ed074e667f47845a
Contents?: true
Size: 1.16 KB
Versions: 69
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
69 entries across 69 versions & 2 rubygems