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 111<br />

Command Portability<br />

Portability refers to how easily code will run on any environment. Most of the commands created<br />

in this tutorial are portable. The parts that aren’t too portable are those relating to Rsync. Rsync is<br />

a *nix utility, and is therefore not found on Windows machines.<br />

If you find the deploy command gives you headaches; feel free to jump in just before it and deploy<br />

the distribution folder (after build, copy and clean commands) by whatever means works for you.<br />

Preprocessors<br />

Preprocessors are things which convert some intermediate languages into common languages (such<br />

as converting Less, SASS, Stylus into CSS). These are often combined with deployment workflows.<br />

Due to time constraints; I’ve not covered them in this tutorial. If you need to add them then a good<br />

place would be as a filter in the asset:combine or asset:minify commands. You may also want to<br />

add another command (to be executed before those two) which preprocesses any of these languages.<br />

Images<br />

Image optimisation is a huge topic. I might go into detail on how to optimise your images (as part<br />

of the deployment process) in a future tutorial. Assetic does provide filters for this sort of thing; so<br />

check its documentation if you feel up to the challenge!

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

Saved successfully!

Ooh no, something went wrong!