Skip to content

Commit ba8dc72

Browse files
committed
Global Composer install documentation instructions
1 parent adce56d commit ba8dc72

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,35 @@ php mozart.phar compose
3939
```
4040

4141
### Composer
42-
Install through Composer, only required in development environments:
42+
To install Mozart and its dependencies, without conflicting with the dependencies of your project, it is recommended that you install Mozart as a global package, if you choose to install Mozart via Composer.
43+
44+
#### Global package
45+
Using the `global` command when installing Mozart, it will be installed as a system wide package:
46+
47+
```
48+
composer global require coenjacobs/mozart
49+
```
50+
51+
You can then find the bin file named `mozart` inside your `~/.composer/vendor/bin/` directory and run it from your project directory, referencing the full path to the bin file:
52+
53+
```
54+
~/.composer/vendor/bin/mozart compose
55+
```
56+
57+
#### Development dependency of your project
58+
You can install through Composer in the project itself, only required in development environments:
4359

4460
```
4561
composer require coenjacobs/mozart --dev
4662
```
4763

4864
This gives you a bin file named `mozart` inside your `vendor/bin` directory, after loading the whole package inside your project. Try running `vendor/bin/mozart` to verify it works.
4965

50-
After configuring Mozart properly, the `mozart compose` command does all the magic.
66+
After configuring Mozart properly, the `mozart compose` command does all the magic:
67+
68+
```
69+
vendor/bin/mozart compose
70+
```
5171

5272
## Configuration
5373
Mozart requires little configuration. All you need to do is tell it where the bundled dependencies are going to be stored and what namespace they should be put inside. This configuration needs to be done in the `extra` property of your `composer.json` file:

0 commit comments

Comments
 (0)