middleman-sprockets icon indicating copy to clipboard operation
middleman-sprockets copied to clipboard

Allow passing a proc/class to asset_path

Open stevenosloan opened this issue 8 years ago • 4 comments

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.

stevenosloan avatar Mar 31 '16 17:03 stevenosloan

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

tdreyno avatar Apr 01 '16 17:04 tdreyno

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?

stevenosloan avatar Apr 01 '16 18:04 stevenosloan

Makes sense.

tdreyno avatar Apr 01 '16 21:04 tdreyno

I needed this capability today, so I have created a pull request. Let me know how it looks.

vvasabi avatar Aug 26 '16 16:08 vvasabi