https://github.com/attitude/combined.php
Straightforward assets combine script written for PHP
https://github.com/attitude/combined.php
Last synced: 3 months ago
JSON representation
Straightforward assets combine script written for PHP
- Host: GitHub
- URL: https://github.com/attitude/combined.php
- Owner: attitude
- License: mit
- Created: 2016-09-06T16:37:29.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-29T11:02:59.000Z (over 8 years ago)
- Last Synced: 2025-01-18T02:14:53.944Z (5 months ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Combined.php
Straightforward *.css* and *.js* assets combine script written for PHP.
## Usage
Script loads only assets that are on the directory level next to it.
##### Example structure:
- **(root)**
- assets/
- css/
- normalize.min.css
- styles.min.css
- js/
- modernizr.min.js
- jquery.min.js
- **combined/** _(this repository clone)_\*
- .htaccess
- index.php\*_No need to use `combined.php` as name of the repository clone directory._
##### Cache Busting:
To understand why this is important and even a better solution than
using something like `*.css?v231`, please [see this post]( http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/).```php
In production, consider using cache busting method.
```html
<link rel="stylesheet" href="/assets/combined/?files=css/normalize.min.css;css/styles.min.css" type="text/styles">
<script async type="text/javascript" src="/assets/combined/?files=js/modernizr.min.js;js/jquery.min.js"
```