middleman-sprockets
middleman-sprockets copied to clipboard
Allow passing a proc/class to asset_path
This would allow users to "rebuild" the 3.x behavior of placing assets in their respective css_dir
, js_dir
.... In theory this should be easier for each case (since the source => dest is known) and less surprising than results could be in 3.x.
Hmm, can this use or build upon the move_file
feature in core?
https://github.com/middleman/middleman/blob/master/middleman-core/lib/middleman-core/sitemap/extensions/move_file.rb
Yeah, I guess it could -- I was thinking though since we're setting linked asset paths here that allowing users to give a proc for that would be easier to keep track of than finding those assets again and using move_file. That make sense to you?
Makes sense.
I needed this capability today, so I have created a pull request. Let me know how it looks.