03.12.2015 Views

laravel4cookbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Deployment 93<br />

.<br />

This file should be saved as app/commands/AssetCombineCommand.php.<br />

The AssetCombineCommand class expects the aforementioned list of assets and will output the<br />

results to console, by default. If we want to save the results to a file we can provide the –output<br />

option with a path to the combined file.<br />

.<br />

You can learn more about Assetic at: https://github.com/kriswallsmith/assetic/<br />

Minifying Assets<br />

Minifying asset files is just as easy; thanks to the Assetic-Minifier filters. Assetic provides filters<br />

which can be used to transform the output of asset files.<br />

Usually some of these filters depend on third-party software being installed on the server, or things<br />

like Java applets. Fortunately, the Assetic-Minifier library provides pure PHP alternatives to CssMin<br />

and JSMin filters (which would otherwise need additional software installed).<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!