Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Optimize shouldn't compile views.
- Loading branch information
Showing
with
0 additions
and
32 deletions.
-
+0
−32
src/Illuminate/Foundation/Console/OptimizeCommand.php
|
@@ -66,10 +66,6 @@ public function fire() |
|
|
$this->info('Compiling common classes'); |
|
|
|
|
|
$this->compileClasses(); |
|
|
|
|
|
$this->info('Compiling views'); |
|
|
|
|
|
$this->compileViews(); |
|
|
} |
|
|
else |
|
|
{ |
|
@@ -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. |
|
|
* |
|
|
This comment has been minimized.
?
This comment has been minimized.
@taylorotwell So how can they be optimised?
This comment has been minimized.
It never "optimized" them anyway.
This comment has been minimized.
@GrahamCampbell but the functionality was good. We were using it on minifying templates after deploy.