Closed matellis closed 13 years ago
Yes... The reason why I decided to use an "embed" folder instead of whitelisting images in assets.yml
was for simplicity -- instead of having another path to configure, just drop your images in embed
, and you're done.
If we can figure out an objectively-nicer API for specifying embedded images, I'd be glad to change Jammit to use it.
Is there any reason we couldn't simply extend the assets.yml to look like:
embed_assets: on
javascripts:
workspace:
- public/javascripts/vendor/jquery.js
- public/javascripts/lib/*.js
- public/javascripts/views/**/*.js
- app/views/workspace/*.jst
stylesheets:
common:
- public/stylesheets/reset.css
- public/stylesheets/widgets/*.css
workspace:
- public/stylesheets/pages/workspace.css
empty:
- public/stylesheets/pages/empty.css
whitelist:
- public/images/cupertino
- public/images/ui.theme
etc.? I see you're currently using a regex of 'embed' in compression.rb We would have to build an array of these whitelisted folders and see if any of those matched too.
Or am I missing a bigger point? I'm new to jammit...
You could do it with an embeds
array in assets.yml
... using directory globs like the others. It's not a particularly nice API though. Perhaps the best thing to do would be for you to try it out in your fork of Jammit, and see how it goes.
OK, I'll give it a go over the next few weeks. Thx.
I'm using several toolkits that expect their images in a specific folder, i.e. I can't move their teensy little icons to a folder with 'embed' without forking the plugin.
Can we allow for a list of whitelisted image folders in the Assets.yml?