diff --git a/composer.json b/composer.json index 2428cae..fa51794 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,6 @@ }, "autoload": { "psr-4": { - "Todaymade\\Daux\\Extension\\": "daux/", "Todaymade\\Daux\\": "libs/" } }, diff --git a/libs/Console/Serve.php b/libs/Console/Serve.php index b782fa8..602e480 100755 --- a/libs/Console/Serve.php +++ b/libs/Console/Serve.php @@ -17,7 +17,6 @@ class Serve extends DauxCommand ->setName('serve') ->setDescription('Serve documentation') - ->addOption('configuration', 'c', InputOption::VALUE_REQUIRED, 'Configuration file') ->addOption('source', 's', InputOption::VALUE_REQUIRED, 'Where to take the documentation from') ->addOption('processor', 'p', InputOption::VALUE_REQUIRED, 'Manipulations on the tree') @@ -44,9 +43,7 @@ class Serve extends DauxCommand putenv('DAUX_SOURCE=' . $daux->getParams()->getDocumentationDirectory()); putenv('DAUX_THEME=' . $daux->getParams()->getThemesPath()); putenv('DAUX_CONFIGURATION=' . $daux->getParams()->getConfigurationOverrideFile()); - - //TODO :: support processor - //putenv('DAUX_PROCESSOR=' . $daux->getParams()->getProcessorFile()); + putenv('DAUX_EXTENSION=' . DAUX_EXTENSION); $base = ProcessUtils::escapeArgument(__DIR__ . '/../../'); $binary = ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false)); @@ -63,16 +60,4 @@ class Serve extends DauxCommand passthru("{$binary} -S {$host}:{$port} {$base}/index.php"); } } - - protected function prepareProcessor(Daux $daux, InputInterface $input, OutputInterface $output, $width) - { - if ($input->getOption('processor')) { - $daux->getParams()['processor'] = $input->getOption('processor'); - } - - $class = $daux->getProcessorClass(); - if (!empty($class)) { - $daux->setProcessor(new $class($daux, $output, $width)); - } - } } diff --git a/libs/bootstrap.php b/libs/bootstrap.php index ad0260a..622691c 100644 --- a/libs/bootstrap.php +++ b/libs/bootstrap.php @@ -1,20 +1,40 @@ setPsr4("Todaymade\\Daux\\Extension\\", $ext); } - -// Loaded in the project itself, when vendor isn't installed -if (file_exists(__DIR__ . '/../daux.phar')) { - define('PHAR_DIR', __DIR__ . '/..'); - - return require_once 'phar://' . __DIR__ . '/../daux.phar/vendor/autoload.php'; -} - -throw new Exception('Impossible to load Daux, missing vendor/ or daux.phar');