documentcloud / jammit

Industrial Strength Asset Packaging for Rails
http://documentcloud.github.com/jammit/
MIT License
1.16k stars 197 forks source link

Separate destination path for different asset groups? #163

Closed marzdrel closed 13 years ago

marzdrel commented 13 years ago

I am not even sure, if this functionality is currently implemented, but it look like it isnt. I need to generate tons of different css/js packages, as my application renders many different sites with custom themes. I would love to be able to point a destintion directory for packed css/js separately for each group.

Is this possible in current version?

webandy commented 13 years ago

@mdroz A first cut you could do would be a script to generate with all the directors you want {foo, bar, baz} that loops through the directories and calls jammit specifying --output public/#{dir} to dump all groups in all directories. to optimize that further I'd probably add the ability to pass in directories to jammit and write out the consolidated asset file if the group name matches one of the directory names, but I think you'd have to write that code yourself.

marzdrel commented 13 years ago

Well, I got around this with some trivial rake tasks / shell scripting. The biggest issue for me right now is that I cannot use YAML reference syntax in the config file (<<: *default). Lots of the sets are build on top of the very same files, so I have tons of duplication. I will made another ticket for this I guess, since it its not related.

jashkenas commented 13 years ago

I don't think that Jammit is going to handle your use case without building on top of it. If you want to bake out tons of different css/js packages, you should probably be scripting that out.