twigc/bin/compile

27 lines
525 B
Plaintext
Raw Normal View History

2016-07-24 20:28:49 +02:00
#!/usr/bin/env php
<?php
/**
* This file is part of twigc.
*
* @author dana <dana@dana.is>
2016-07-24 20:28:49 +02:00
* @license MIT
*/
require_once __DIR__ . '/../src/bootstrap.php';
use Symfony\Component\Console\Output\ConsoleOutput;
use Dana\Twigc\PharCompiler;
2016-07-24 20:28:49 +02:00
$verbose = false;
$verboseArgs = ['v', 'vv', 'vvv', 'verbose', 'debug'];
foreach ( $argv as $arg ) {
if ( in_array(ltrim($arg, '-'), $verboseArgs, true) ) {
$verbose = true;
break;
}
2016-07-24 20:28:49 +02:00
}
(new PharCompiler(new ConsoleOutput(), $verbose))->compile('twigc.phar');