pug

Summary

Maintainability
Test Coverage
#!/usr/bin/env php
<?php

use Phug\Cli;

$autoload = 'vendor/autoload.php';
if (!file_exists($autoload)) {
    $autoload = __DIR__.'/../autoload.php';
}
if (!file_exists($autoload)) {
    $autoload = __DIR__.'/../../autoload.php';
}
if (!file_exists($autoload)) {
    $autoload = __DIR__.'/vendor/autoload.php';
}
if (!file_exists($autoload)) {
    throw new \RuntimeException('Autoload not found. Please run: composer install');
}

include $autoload;

$cli = new Cli('Pug\Facade', [
    'render',
    'renderFile',
    'renderDirectory',
    'compile',
    'compileFile',
    'compileDirectory' => 'textualCacheDirectory',
    'display'          => 'render',
    'displayFile'      => 'renderFile',
    'displayDirectory' => 'renderDirectory',
    'cacheDirectory'   => 'textualCacheDirectory',
]);

exit($cli->run($argv) ? 0 : 1);