Add build instructions, fix some formatting inconsistencies
This commit is contained in:
parent
5d86498b1b
commit
5ffce63100
2 changed files with 24 additions and 2 deletions
19
README.md
19
README.md
|
@ -38,6 +38,25 @@ To install this package with Nix, clone the Git repository and run:
|
|||
$ nix-env -f release.nix -iA package.x86_64-linux
|
||||
```
|
||||
|
||||
Building a development version
|
||||
==============================
|
||||
A development version can be deployed by checking out the Git repository and
|
||||
running:
|
||||
|
||||
```bash
|
||||
$ nix-env -f release.nix -iA package.x86_64-linux
|
||||
```
|
||||
|
||||
The above command installs the development `composer2nix` executable into the
|
||||
Nix profile of the user.
|
||||
|
||||
Alternatively, you can use `composer` directly to install the project
|
||||
dependencies:
|
||||
|
||||
```bash
|
||||
$ composer install
|
||||
```
|
||||
|
||||
Usage
|
||||
=====
|
||||
You need a project providing a `composer.json` and (if applicable) a
|
||||
|
|
|
@ -8,13 +8,16 @@ $autoloadLocations = [
|
|||
__DIR__ . '/../../../autoload.php',
|
||||
];
|
||||
$loaded = false;
|
||||
foreach ($autoloadLocations as $autoload) {
|
||||
foreach ($autoloadLocations as $autoload)
|
||||
{
|
||||
if (is_file($autoload)) {
|
||||
require_once($autoload);
|
||||
$loaded = true;
|
||||
}
|
||||
}
|
||||
if (!$loaded) {
|
||||
|
||||
if (!$loaded)
|
||||
{
|
||||
fwrite(STDERR,
|
||||
'You must set up the project dependencies, run the following commands:' . PHP_EOL .
|
||||
'curl -s http://getcomposer.org/installer | php' . PHP_EOL .
|
||||
|
|
Loading…
Reference in a new issue