CodeSleeve / asset-pipeline

This Laravel 4 package provides a very simple and easy to use asset pipeline. It was heavily inspired by the Rails asset pipeline. We make use of the wonderful Assetic package to help with pre-compliation!
http://www.codesleeve.com
MIT License
489 stars 53 forks source link

Link to URL instead of path #98

Closed marsderp closed 10 years ago

marsderp commented 10 years ago

Currently I am experiencing the need to install Laravel in subdirectories, i.e. http://example.com/directory/ which results in the generated style/js path breaking when within route group prefixes, i.e. http://example.com/directory/category/abc

My current solution is to create a local version StylesheetComposer and JavascriptComposer and modify this as such:

print "<script src=\"".url()."{$path}\" {$text}></script>" . PHP_EOL;

I don't think this is the most elegant/effective way, any thoughts/suggestions?

kdocki commented 10 years ago

@marsd so are you using assets as the routing.prefix? You are expecting to get something like http://example.com/subdir/assets/foo.css but you are getting just /assets/foo.css right?

kdocki commented 10 years ago

Fixed issue in dev-testing bringing in on next release.