asset-rack icon indicating copy to clipboard operation
asset-rack copied to clipboard

i'd like to be able to access assets from within .coffee, .js or .styl

Open gregory opened this issue 11 years ago • 2 comments

I kind of having hard time to understand the existing code for jade so I decided to open an issue.

I guess the quickfix would be to append

var assets = { 
  assets: #{JSON.stringify(assets)},
  url: #{(url) -> @assets[url]}
};

like it's done for jadeasset.

If anyone could do that i'd be glad.

My original issue is that i'm using requirejs and i'd need to be able to access assets.url.

thanks!

gregory avatar Oct 15 '13 02:10 gregory

+1

Would love to have this feature as well.

ronaldcurtis avatar Nov 01 '13 04:11 ronaldcurtis

My apologies, I just noticed that asset-rack automatically transforms image references in .styl to the md5 hashed version. Very cool!

ronaldcurtis avatar Nov 01 '13 09:11 ronaldcurtis