Create a "daux" binary

Refactored Daux a bit to allow generating documentation from working directory
Cette révision appartient à :
Stéphane Goetz
2016-07-27 23:27:51 +02:00
Parent 4f5bc217e7
révision 3375f8ff2b
15 fichiers modifiés avec 164 ajouts et 71 suppressions

Voir le fichier

@ -15,9 +15,14 @@ class Template
*/
public function __construct($base, $theme)
{
// Use templates from the phar archive if the templates dir doesn't exist.
// Use internal templates or the ones in the phar
// archive if no templates dir exists in the working directory
if (!is_dir($base)) {
$base = 'phar://daux.phar/templates';
if (is_dir(__DIR__ . '/../../../templates')) {
$base = __DIR__ . '/../../../templates';
} else {
$base = 'phar://daux.phar/templates';
}
}
// Create new Plates instance