@@ -8,21 +8,53 @@ How to use?
88-----------
99
1010``` php
11- use Secondtruth\Compiler\Compiler;
12-
1311$compiler = new Compiler(PROJECT_PATH);
1412
15- $compiler->addIndexFile('mycoolprogram.php');
13+ $compiler->addIndexFile('bin/ mycoolprogram.php');
1614$compiler->addDirectory('libraries');
1715
1816$compiler->addFile('vendor/autoload.php');
1917$compiler->addDirectory('vendor/composer', '!*.php');
20- $compiler->addDirectory('vendor/symfony/console/Symfony /Component/Console', ['Tests/*', '!*.php']);
18+ $compiler->addDirectory('vendor/... /Component/Console', ['Tests/*', '!*.php']);
2119
2220$compiler->compile("$outputDir/mycoolprogram.phar");
2321```
2422
2523
24+ Installation
25+ ------------
26+
27+ ### Install via Composer
28+
29+ Create a file called ` composer.json ` in your project directory and put the following into it:
30+
31+ ```
32+ {
33+ "require": {
34+ "secondtruth/phar-compiler": "dev-master"
35+ }
36+ }
37+ ```
38+
39+ [ Install Composer] ( https://getcomposer.org/doc/00-intro.md#installation-nix ) if you don't already have it present on your system:
40+
41+ $ curl -sS https://getcomposer.org/installer | php
42+
43+ Use Composer to [ download the vendor libraries] ( https://getcomposer.org/doc/00-intro.md#using-composer ) and generate the vendor/autoload.php file:
44+
45+ $ php composer.phar install
46+
47+ Include the vendor autoloader and use the classes:
48+
49+ ``` php
50+ namespace Acme\MyApplication;
51+
52+ use Secondtruth\Compiler\Compiler;
53+
54+ require_once 'vendor/autoload.php';
55+ ```
56+
57+
2658Requirements
2759------------
2860
0 commit comments