rougin / blueprint
Bootstraps your file-generating console applications.
Installs: 5 423
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: >=5.4.0
- league/flysystem: ~1.0
- rdlowrey/auryn: ~1.0
- rougin/slytherin: ~0.9
- symfony/console: ~2.8|~3.0
- symfony/yaml: ~2.8|~3.0
- twig/twig: ~1.24
Requires (Dev)
- phpunit/phpunit: 4.2
- scrutinizer/ocular: ~1.1
README
Bootstraps your file-generating console applications.
Installation
Install Blueprint
via Composer:
$ composer require rougin/blueprint
Basic Usage
Creating new blueprint.yml
$ vendor/bin/phpunit init
blueprint.yml
paths: templates: %%CURRENT_DIRECTORY%%/src/Templates commands: %%CURRENT_DIRECTORY%%/src/Commands namespaces: commands: Rougin\Blueprint\Commands
- Replace the values specified in the
blueprint.yml
file - Add your console commands and templates (if required) to their respective directories
Sample console command
blueprint.yml
... namespaces: commands: Acme\Commands
src/Commands/TestCommand.php
namespace Acme\Commands; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class TestCommand extends Command { protected function configure() { $this->setName('test')->setDescription('Returns a "Test" string'); } protected function execute(InputInterface $input, OutputInterface $output) { $output->writeln('<info>Test</info>'); } }
Add specified namespace to composer.json
"autoload": { "psr-4": { "Acme\\": "src" } }
$ composer dump-autoload
Run the "test" command
$ vendor/bin/blueprint test
Test
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Credits
License
The MIT License (MIT). Please see LICENSE for more information.