Skip to content

Commit

Permalink
Fix output directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Aug 2, 2016
1 parent 4cd4378 commit 1cd17aa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Jade/JadeSymfonyEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ public function __construct($kernel)
$this->container = $container;
$environment = $container->getParameter('kernel.environment');
$appDir = $container->getParameter('kernel.root_dir');
$rootDir = dirname($appDir);
$assetsDirectories = array($appDir . '/Resources/assets');
$srcDir = dirname($appDir) . '/src';
$srcDir = $rootDir . '/src';
$webDir = $rootDir . '/web';
$baseDir = null;
foreach (scandir($srcDir) as $directory) {
if (is_null($baseDir) && is_dir($srcDir . '/Resources/views')) {
Expand All @@ -50,7 +52,7 @@ public function __construct($kernel)
'cache' => substr($environment, 0, 3) === 'dev' ? false : $cache,
'environment' => $environment,
'extension' => array('.pug', '.jade'),
'outputDirectory' => __DIR__ . '/../../../web',
'outputDirectory' => $webDir,
'preRender' => array($this, 'preRender'),
'prettyprint' => $kernel->isDebug(),
));
Expand Down

0 comments on commit 1cd17aa

Please sign in to comment.