This boilerplate helps you to create PHAR archives from you CLI commands. Same as JAR in Java.
##Installation
Install Box.
curl -LSs https://box-project.github.io/box2/installer.php | php
chmod +x box.phar
mv box.phar /usr/local/bin/box
Install Composer
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
chmod +x /usr/local/bin/composer
Fetch dependencies
composer install
src/Application/Command
path is automatically scanned for commands. Name convention *Command.php
. To learn more about commands see manual.
There is no reason to build your application each time, so run bin/boilerplate
command, and you will get same result.
php bin/boilerplate
or mark file as executable with chmod +x bin/boilerplate
and run
./bin/boilerplate
box build
php boilerplate.phar
or mark file as executable with chmod +x boilerplate.phar
and run
./boilerplate.phar