rstacruz / sinatra-assetpack

Package your assets transparently in Sinatra.
http://ricostacruz.com/sinatra-assetpack/
MIT License
541 stars 97 forks source link

Have :from option support an array of files to easier support vendored frameworks #53

Closed wakatara closed 11 years ago

wakatara commented 12 years ago

It would be most awesome if the :from option for assetpack (which is great by the way) would support an array fo files for when you have situations where you have a framework like Twitter's bootstrap which already has everything nicely configured in its "own" /css, /js, /imgs file.

So, being able to put the following in the directives:


assets {
    serve '/js',     from: ['app/js', 'app/vendor/bootstrap/js']  
    serve '/css',    from: ['app/css', 'app/vendor/bootstrap/less']  
    serve '/images', from: 'app/images', 'app/vendor/bootstrap/img']

Would be totally useful and lead to much cleaner code organization and not having to split these things up manually.

Still, great work on sinatra-assetpack though. Liking it, just really need it to support this feature before rolling it into the next release of my software.

ciao ! Daryl.

j15e commented 11 years ago

Good idea, might look into it for future version. If someone can provide a PR I'll definitively look into it.

j15e commented 11 years ago

It involves too much additional serving logic, I'll close this one for now. You should/could either drop them in app or use 2 serving paths or serve a package. Packages kind of already do this feature.