rails-assets icon indicating copy to clipboard operation
rails-assets copied to clipboard

Wrong info for imagesloaded

Open dsandstrom opened this issue 7 years ago • 2 comments

We need to require the pkgd version, similar to #400:

//= require imagesloaded/imagesloaded.pkgd

dsandstrom avatar Apr 07 '17 00:04 dsandstrom

Can you suggest a way to programatically determine this? The only way I see is by reading the README. The bower.json specifies in "main" that imagesloaded.js (not the pkgd version) is what should be loaded. It seems like this is an unfortunate consequence of the Bower maintainer changing the meaning of the "main" key of bower.json.

hut8 avatar Apr 07 '17 09:04 hut8

Programmatically? A naming map maintained by rails-assets, however this is not ideal because it would have to be kept up to date. A better way would be to convince the js package maintainer to change their main key. Yet, this is not guaranteed to work. Also, I have limited experience with bower configs so not sure who is right.

A naming map might solve the "foo.js" problem because when a package ends with ".js", rails-assets shows require foo.js.js in the readme. However, this doesn't solve the css require issue because that probably changes for each package.

dsandstrom avatar Apr 07 '17 18:04 dsandstrom