CodepadME / laravel-tricks

The source code for the Laravel Tricks website
http://laravel-tricks.com
MIT License
966 stars 298 forks source link

bad asset file names #48

Closed Remo closed 10 years ago

Remo commented 10 years ago

I was always thinking I'm doing something wrong but now that I'm working on it again and still don't understand it, I really wonder what I'm missing.

There a file called logo@2x.png in this directory. https://github.com/CodepadME/laravel-tricks/tree/master/public/img. However, when I look at the code https://github.com/CodepadME/laravel-tricks/blob/master/app/views/partials/navigation.blade.php#L12 I only see a reference to logo@2x.1.png.

I renamed a bunch of files when I first deployed it to my site, but I'd like to be able to pull changes from the official repository which isn't possible anymore due to a number of differences.

msurguy commented 10 years ago

The .htaccess file takes care of the naming of assets (check https://github.com/CodepadME/laravel-tricks/blob/master/public/.htaccess , the "cachebusting" section) so that if the asset is named bootstrap.css it will automatically insert a cache-busting part of the filename (bootsrap.1.css). In the future release we will remove this technique in favor of gulp.js and its minification/cache-busting techniques.

msurguy commented 10 years ago

Perhaps @stidges could also explain a bit more about this.

Remo commented 10 years ago

I see! I'm using the PHP built in webserver right now. Works quite well, but obviously doesn't process .htaccess.. No need for further explanations, might be nice though to have a solution which doesn't depend on apache (or any other specific rewrite rules).

msurguy commented 10 years ago

If you have experience with gulp.js feel free to convert our existing pipeline into that (it is really easy, I promise, I just don't have the time right now to do it)

Remo commented 10 years ago

I'm afraid, I don't have any experience with gulp.js nor do I have much spare time right now.

msurguy commented 10 years ago

Cool, no problem!