Download the PHP package jrohde/smarty-ass without Composer
On this page you can find all versions of the php package jrohde/smarty-ass. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package smarty-ass
Smarty 3+ plugin to bundle and minify js and/or css files.
This Smarty plugin uses Matthias Mullie's Minify library to do it's minifications and bundling.
It automatically checks for (JS/CSS) file/code changes and then rebuild's the minified/bundled output file.
Table of Contents
- Installation
- Parameters
- Usage/Examples
Installation
Use Composer to include the library into your project:
$ composer.phar require jrohde/smarty-ass
Now add the plugin dir to your Smarty instance:
You can check if the correct path was added by using:
Parameters
- in (array) - absolute path('s) to local JS or CCS files, inline or tags and/or external JS or css files.
- out (string) - absolute path to the minified and bundled file output (must be writable by the webserver/php user!). This parameter is optional and defaults to '/assets/(js/css)/${smarty_template_name}_combined.(css/js)'.
- ttl (integer) - time to live in of cached files in seconds. This is the maximum time a minified/combined file may exist before a complete rebuild. Note that when source files are modified the output file is regenerated, regardless of this value. This parameter is optional and defaults to '31536000' (a.k.a: 1 year).
- gzip (boolean) - gzip's the output file. Make sure your PHP/Webserver supports this! This parameter is optional and defaults to 'false'
- debug (boolean) - disables compilation and just output all as normal if set to: 'true'. This parameter is optional and defaults to 'false'
Usage (in Smarty 3+ templates)
You may also use external js/css/cdn's like:
Use/add inline css or js (but make sure to escape single/double quotes!):
Or even mix it all together: