2014-01-11 16:22:10 -05:00
|
|
|
<?php
|
|
|
|
error_reporting(E_ALL | E_STRICT);
|
|
|
|
|
|
|
|
// If the dependencies aren't installed, we have to bail and offer some help.
|
|
|
|
if (!file_exists(__DIR__ . '/vendor/autoload.php')) {
|
|
|
|
exit("\nPlease run `composer install` to install dependencies.\n\n");
|
|
|
|
}
|
|
|
|
|
2014-01-12 10:05:09 -05:00
|
|
|
// Bootstrap our application with the Composer autoloader
|
2017-10-16 19:00:50 -04:00
|
|
|
$app = include __DIR__ . '/vendor/autoload.php';
|
2014-01-11 16:22:10 -05:00
|
|
|
|
|
|
|
// Setup the namespace for our own namespace
|
2014-01-12 10:05:09 -05:00
|
|
|
$app->add('Resume', __DIR__ . '/src');
|
2014-01-11 16:22:10 -05:00
|
|
|
|
|
|
|
// Instantiate our Console application
|
2014-01-12 10:05:09 -05:00
|
|
|
$console = new Resume\Cli\Resume();
|
2014-01-11 16:22:10 -05:00
|
|
|
|
|
|
|
// If we're running from phar, we get these values from the stub
|
2014-03-24 09:02:05 -04:00
|
|
|
if (!defined('IN_PHAR')) {
|
2014-01-11 16:22:10 -05:00
|
|
|
$project = json_decode(file_get_contents(__DIR__ . '/composer.json'));
|
|
|
|
}
|
|
|
|
|
|
|
|
$templatePath = __DIR__ . '/templates';
|
2014-01-12 10:57:39 -05:00
|
|
|
$consoleTemplatePath = __DIR__ . '/src/Resume/Templates';
|
2014-01-11 16:22:10 -05:00
|
|
|
|
|
|
|
// Init the app with these params
|
2014-01-12 10:57:39 -05:00
|
|
|
$console->initialize($templatePath, $consoleTemplatePath, $project);
|
2014-01-11 16:22:10 -05:00
|
|
|
|
|
|
|
// Execute the console app.
|
|
|
|
$console->run();
|
|
|
|
|
2014-01-12 10:05:09 -05:00
|
|
|
/* End of resume.php */
|