Skip to content

Easy way to add gems' assets as input directories #61

Open
jamesarosen opened this Issue Feb 20, 2012 · 3 comments

3 participants

@jamesarosen

For example, I'd like to be able to have a project with bootstrap-sass in the Gemfile and easily be able to add its vendor/assets/* folders to the input paths. It doesn't have to be as auto-magical as Rails+Sprockets (where anything in lib/assets/* is added to Sprockets's path), but it would be nice to have a shorter version of

Dir.glob(Pathname.new(Gem.loaded_specs["bootstrap-sass"].gem_dir).join('vendor/assets/*').to_s).each do |path|
  input path
end
@jamesarosen

Even this doesn't really emulate what Sprockets does, though. The problem is that if I add all of those directories as input directories, all of the files inside them will end up in my (concatenated) output. In Sprockets (and Ruby, and Java, ...), only those that get required are included.

@mulderp
mulderp commented Sep 20, 2012

As an intermediary step and for debugging, maybe it would be helpful to dry-run assets compilation where the paths and compilation rules can be investigated?

@joefiorini

This seems like something that should be handled by the filter itself, not the pipeline, no? For example, I'd want those extra asset folders to be on the load path when I run Sass or Minispade, but not generally considered inputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.