Message-ID: <1102283382.2996.1485851555788.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_2995_1766369022.1485851555788" ------=_Part_2995_1766369022.1485851555788 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Composer for Frontend Developers

Composer for Frontend Developers

If you are a web designer or working on the CSS on your website,= this page contains is all you need to know about Composer.

Composer is an opensource PHP packaging system to manage dependen= cies.

This makes it easy to adapt package installs and updates to your workflo= w, allowing you to test new/updated packages in a development environment, = put the changes in your version control system (git, Subversion, Mercurial,= etc.), pull in those changes on a staging environment and, when approved, = put it in production.

Troubleshooting

You may experience some latency in dependency resolution: everything is = going normally.

If you are interested by the process, do your Composer commands with the= --verbose option activated.

Option verbo= se -v

Increase the verbosity of messages: 1 for normal output, 2 for more verb= ose output and 3 for debug.

Usage:

=20
php -d memory_limit=3D-1 composer.phar <command> --verbo=
se (-v|vv|vvv)
=20

Useful commands

install

The install command reads the composer.lock file from the c= urrent directory, processes it, and downloads and installs all the librarie= s and dependencies outlined in that file. If the file does not exist it wil= l look for composer.json and do the same.

Usage

=20
php -d memory_limit=3D-1 composer.phar install --dry-run --pre=
fer-dist
=20

In this example the dry-run option is mentioned to prevent = you from doing anything critical. (This option outputs the operations but w= ill not execute anything and implicitly enables the verbose mode).

Do= cumentation with complete usage:

=20
php -d memory_limit=3D-1 composer.phar install [--prefer-sourc=
e] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-cust=
om-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--o=
ptimize-autoloader] [packages1] ... [packagesN]
=20

update

 The update command reads the composer.json file from = the current directory, processes it, and updates, removes or installs all t= he dependencies.

Interesting op= tions:

To limit the update operation to a few packages, you can list the packag= e(s) you want to update as such:

=20
php -d memory_limit=3D-1 composer.phar update vendor/package1 =
foo/mypackage 
=20

 You may also use an asterisk (*) pattern to limit the update opera= tion to package(s) from a specific vendor:

=20
php -d memory_limit=3D-1 composer.phar update vendor/package1 =
foo/* 
=20

 

 

------=_Part_2995_1766369022.1485851555788--