diff --git a/doc/install.md b/doc/install.md index 3a2a0ea2..76d37d16 100644 --- a/doc/install.md +++ b/doc/install.md @@ -4,30 +4,30 @@ ## Composer and Packagist -You must use Composer to install Html2Pdf. +You have to use Composer to install Html2Pdf. -If you do not know what is Composer, you are a few years late... +If you do not know what is Composer: -It is used by all the modern PHP applications (Magento2, Drupal, EasyPlatform, Symfony, ...). - -You can read all the pages on https://getcomposer.org/doc/ - -You can find all the available packages on https://packagist.org/ - -For example, you can find Html2Pdf: https://packagist.org/packages/spipu/html2pdf - -You have to commit the `composer.json` and `composer.lock` files, but **never** commit the `vendor` folder. - -If you do not understand why, it is because you have not read the Composer documentation... +* You can find the documentation on https://getcomposer.org/doc/ +* You can find all the available packages on https://packagist.org/ +* For example, you can find Html2Pdf: https://packagist.org/packages/spipu/html2pdf ## Install -You have just to launch the following command on the root folder of your project: +You just have to launch the following command on the root folder of your project: ```bash composer require spipu/html2pdf ``` +If you do not want to use composer, you will need to: + +* manually clone the html2pdf repository +* manually clone all the repositories of the used dependencies +* manage manually the PS4 autoload + +But it is not the recommaned way to instal Html2Pdf. No help will be provided in this case. + ### First Test Here is a HelloWorld example, that you can put on the root folder of your project. @@ -46,19 +46,4 @@ Html2Pdf use the PSR-4 autoloader of Composer. You have just to require it. Neve Then, you have just to use the main class `Spipu\Html2Pdf\Html2Pdf`, with the 2 main methods `writeHTML` and `output`. -### And on production ? - -You have **not** to install composer on your production server. - -You have to install composer **only** on your dev environement. Composer is a dev tool. - -To deliver you app on a server, you have to (on you dev environement) : - - * Git clone the tag/branch that you want to deliver - * Launch the command `composer install --no-dev` - * Remove the useless files (like the `.git` folder) - * Zip all - -That's all, you have a beautifull package that can be deliver on a server ! - [back](./README.md)