Composer and NPM

From OpenEMR Project Wiki

Under Construction.

Installation

Windows

The installer will download composer for you and set up your PATH environment variable so you can simply call composer from any directory. Download and run Composer-Setup.exe - it will install the latest composer version whenever it is executed.

Linux & Mac OS

The first step is to download Composer, which will effectively create a Phar (PHP Archive) file called composer.phar. From your terminal, run the following command:

curl -sS https://getcomposer.org/installer | php

The resulting file will be called composer.phar, a PHP Archive that can be executed directly via PHP. However, in our case, we want Composer to be accessible globally by simply typing composer. To do this, move it to /usr/bin/ and create an alias:

sudo mv composer.phar /usr/local/bin/
vim ~/.bash_profile

Add this to your .bash_profile. It may be empty or non-existent, so go ahead and create it:

alias composer="php /usr/local/bin/composer.phar"

Now, relaunch your terminal and you'll be able to access Composer simply by calling composer