Skip to content

Commit

Permalink
Optimize shouldn't compile views.
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 10, 2015
1 parent cfa7fcb commit 7bf50d8
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions src/Illuminate/Foundation/Console/OptimizeCommand.php
Expand Up @@ -66,10 +66,6 @@ public function fire()
$this->info('Compiling common classes');

$this->compileClasses();

$this->info('Compiling views');

$this->compileViews();
}
else
{
Expand Down Expand Up @@ -126,34 +122,6 @@ protected function registerClassPreloaderCommand()
$this->getApplication()->add(new PreCompileCommand);
}

/**
* Compile all view files.
*
* @return void
*/
protected function compileViews()
{
foreach ($this->laravel['view']->getFinder()->getPaths() as $path)
{
foreach ($this->laravel['files']->allFiles($path) as $file)
{
try
{
$engine = $this->laravel['view']->getEngineFromPath($file);
}
catch (InvalidArgumentException $e)
{
continue;
}

if ($engine instanceof CompilerEngine)
{
$engine->getCompiler()->compile($file);
}
}
}
}

/**
* Get the console command options.
*
Expand Down

4 comments on commit 7bf50d8

@GrahamCampbell
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

@reshadman
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taylorotwell So how can they be optimised?

@GrahamCampbell
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It never "optimized" them anyway.

@reshadman
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GrahamCampbell but the functionality was good. We were using it on minifying templates after deploy.

Please sign in to comment.