Ortuna / padrino-pipeline

Sprockets for padrino apps
MIT License
21 stars 8 forks source link

serve compiled output #31

Open daddz opened 10 years ago

daddz commented 10 years ago

Is there a possibility to automatically serve the files generated with pipeline:compile?

Ortuna commented 10 years ago

I have to build out the Rake tasks, I'll probably work on this this weekend. Would be awesome if you could let me know what you would expect from this. Obviously some sort of compiled asset in a predetermined directory. But which directory would you think? public/assets/javascripts? public/assets/?

daddz commented 10 years ago

Thanks for looking in to this!

I think the problem lies in the javascript_include_tag and stylesheet_link_tag functions. They should serve the compiled files in production mode if they exist.

The directory can be set with config.compiled_output already. Default should be PADRINO_ROOT/public/{javascripts/stylesheets/images/fonts} in my opinion.

Maybe add PADRINO_ROOT/public/{sub_app}/{folders} for multiple apps support?

Also the pipeline:compile should copy images and fonts from assets/{folders} to public/{folders}

Hope that's clear enough. I will try to help as soon as I have some time.

Thanks!