Added --prefer-dist to all docs

1. It results in much smaller download and takes less disk space (25MB instead of 180MB for yii-basic + dependencies).
2. It requires less utilities to be installed (no VCS binaries required).
3. It takes less time to install dependencies.
This commit is contained in:
Alexander Makarov
2014-01-07 01:27:04 +04:00
parent c56647ff4c
commit dc45de127c
27 changed files with 31 additions and 30 deletions

View File

@@ -70,7 +70,7 @@ at [getcomposer.org](http://getcomposer.org/doc/00-intro.md#installation-nix).
You can then install the application using the following command:
~~~
php composer.phar create-project --stability=dev yiisoft/yii2-app-advanced advanced
php composer.phar create-project --prefer-dist --stability=dev yiisoft/yii2-app-advanced advanced
~~~

View File

@@ -52,7 +52,7 @@ at [getcomposer.org](http://getcomposer.org/doc/00-intro.md#installation-nix).
You can then install this application template using the following command:
~~~
php composer.phar create-project --stability=dev yiisoft/yii2-app-basic basic
php composer.phar create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic basic
~~~
Now you should be able to access the application through the following URL, assuming `basic` is the directory

View File

@@ -43,7 +43,7 @@ curl -s http://getcomposer.org/installer | php
You can then install the Bootstrap Application using the following command:
~~~
php composer.phar create-project --stability=dev yiisoft/yii2-app-benchmark yii-benchmark
php composer.phar create-project --prefer-dist --stability=dev yiisoft/yii2-app-benchmark yii-benchmark
~~~
Now you should be able to access the benchmark page using the URL

View File

@@ -20,7 +20,7 @@ curl -s http://getcomposer.org/installer | php
You can then install the application using the following command:
~~~
php composer.phar create-project --stability=dev yiisoft/yii2-app-advanced /path/to/yii-application
php composer.phar create-project --prefer-dist --stability=dev yiisoft/yii2-app-advanced /path/to/yii-application
~~~
Getting started
@@ -171,5 +171,5 @@ your project.
Now the interesting part. You can add more packages your application needs to `require` section.
All these packages are coming from [packagist.org](https://packagist.org/) so feel free to browse the website for useful code.
After your `composer.json` is changed you can run `php composer.phar update`, wait till packages are downloaded and
After your `composer.json` is changed you can run `php composer.phar update --prefer-dist`, wait till packages are downloaded and
installed and then just use them. Autoloading of classes will be handled automatically.

View File

@@ -20,7 +20,7 @@ curl -s http://getcomposer.org/installer | php
You can then install the Bootstrap Application using the following command:
~~~
php composer.phar create-project --stability=dev yiisoft/yii2-app-basic /path/to/yii-application
php composer.phar create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic /path/to/yii-application
~~~
Now set document root directory of your Web server to /path/to/yii-application/web and you should be able to access the application using the URL `http://localhost/`.
@@ -159,5 +159,5 @@ your project.
Now the interesting part. You can add more packages your application needs to `require` section.
All these packages are coming from [packagist.org](https://packagist.org/) so feel free to browse the website for useful code.
After your `composer.json` is changed you can run `php composer.phar update`, wait till packages are downloaded and
After your `composer.json` is changed you can run `php composer.phar update --prefer-dist`, wait till packages are downloaded and
installed and then just use them. Autoloading of classes will be handled automatically.

View File

@@ -44,7 +44,7 @@ Once you have edited the `composer.json`, you can invoke Composer to install the
For the first installation of the dependencies, use this command:
```
php composer.phar install
php composer.phar install --prefer-dist
```
This must be executed within your Yii project's directory, where the `composer.json` file can be found.
@@ -54,7 +54,7 @@ to the `composer.phar` script.
For an existing installation, you can have Composer update the dependencies using:
```
php composer.phar update
php composer.phar update --prefer-dist
```
Again, you may need to provide specific path references.

View File

@@ -14,7 +14,7 @@ Gii comes as an offical extension and the preferred way to install this extensio
Either run
```
php composer.phar require yiisoft/yii2-gii "*"
php composer.phar require --prefer-dist yiisoft/yii2-gii "*"
```
or add

View File

@@ -38,7 +38,7 @@ your `composer.json` to include
"yiisoft/yii2-twig": "*",
```
in `require` section and then run `composer update`.
in `require` section and then run `composer update --preder-dist`.
Twig
----

View File

@@ -93,7 +93,7 @@ adding the following to `require`:
"ezyang/htmlpurifier": "v4.6.0"
```
After it's done run `php composer.phar install` and wait till package is downloaded. Now everything is prepared to use
After it's done run `php composer.phar install --prefer-dist` and wait till package is downloaded. Now everything is prepared to use
Yii's HtmlPurifier helper:
```php

View File

@@ -7,7 +7,8 @@ Composer package. Here's how to do it:
1. `git clone git@github.com:yiisoft/yii2-app-basic.git`.
2. Remove `.git` directory from cloned directory.
3. Change `composer.json`. Instead of all stable requirements add just one `"yiisoft/yii2-dev": "*"`.
4. Execute `composer create-project`.
4. Execute `composer create-project`. Do not add `--prefer-dist` to the command since it will not download git repository
then.
5. Now you have working playground that uses latest code.
Note that requirements of extensions that come with `yii2-dev` are not loaded automatically.

View File

@@ -11,7 +11,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require yiisoft/yii2-apidoc "*"
php composer.phar require --prefer-dist yiisoft/yii2-apidoc "*"
```
or add

View File

@@ -12,7 +12,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require yiisoft/yii2-authclient "*"
php composer.phar require --prefer-dist yiisoft/yii2-authclient "*"
```
or add

View File

@@ -19,7 +19,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require yiisoft/yii2-bootstrap "*"
php composer.phar require --prefer-dist yiisoft/yii2-bootstrap "*"
```
or add

View File

@@ -17,7 +17,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require yiisoft/yii2-codeception "*"
php composer.phar require --prefer-dist yiisoft/yii2-codeception "*"
```
or add

View File

@@ -14,7 +14,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require yiisoft/yii2-debug "*"
php composer.phar require --prefer-dist yiisoft/yii2-debug "*"
```
or add

View File

@@ -31,7 +31,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require yiisoft/yii2-elasticsearch "*"
php composer.phar require --prefer-dist yiisoft/yii2-elasticsearch "*"
```
or add

View File

@@ -12,7 +12,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require yiisoft/yii2-faker "*"
php composer.phar require --prefer-dist yiisoft/yii2-faker "*"
```
or add

View File

@@ -13,7 +13,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require yiisoft/yii2-gii "*"
php composer.phar require --prefer-dist yiisoft/yii2-gii "*"
```
or add

View File

@@ -12,7 +12,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require yiisoft/yii2-imagine "*"
php composer.phar require --prefer-dist yiisoft/yii2-imagine "*"
```
or add

View File

@@ -28,7 +28,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require yiisoft/yii2-jui "*"
php composer.phar require --prefer-dist yiisoft/yii2-jui "*"
```
or add

View File

@@ -14,7 +14,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require yiisoft/yii2-mongodb "*"
php composer.phar require --prefer-dist yiisoft/yii2-mongodb "*"
```
or add

View File

@@ -29,7 +29,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require yiisoft/yii2-redis "*"
php composer.phar require --prefer-dist yiisoft/yii2-redis "*"
```
or add

View File

@@ -29,7 +29,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require yiisoft/yii2-smarty "*"
php composer.phar require --prefer-dist yiisoft/yii2-smarty "*"
```
or add

View File

@@ -12,7 +12,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require yiisoft/yii2-sphinx "*"
php composer.phar require --prefer-dist yiisoft/yii2-sphinx "*"
```
or add

View File

@@ -37,7 +37,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require yiisoft/yii2-swiftmailer "*"
php composer.phar require --prefer-dist yiisoft/yii2-swiftmailer "*"
```
or add

View File

@@ -32,7 +32,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require yiisoft/yii2-twig "*"
php composer.phar require --prefer-dist yiisoft/yii2-twig "*"
```
or add

View File

@@ -12,7 +12,7 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require "yiisoft/yii2 *"
php composer.phar require --prefer-dist "yiisoft/yii2 *"
```
or add