Closed gabrielengel closed 11 years ago
I think we might create an helper method to do this more easily but we should not defer javascript by default neither as an option as I think this is out of the scope of a basic asset manager.
We should offer alternate methods to <%= js :app %>
ex. <%= js_path :app %>
which would return only the URL and not a complete tag which allow you to use a defer script like would like to.
Surely! A helper as js_path
can be flexible enough for different implementations of deffering. Sounds nice!
But how do you think this should bahave under development environment, where we don't/shouldn't have a packaged js?
Good question, it might always return an array of path(s)?
We can optimize pageloading by defering javascripts.
I'm not sure on how to implement this on sinatra-assetpack nor how to test it.
If you belive it's a valid feature, could you give me some feedback on this current code? I'll send you another pull request afterwards.
Thanks!