Skip to content

Commit

Permalink
using minify option from config
Browse files Browse the repository at this point in the history
  • Loading branch information
cbl committed Jun 24, 2020
1 parent 314bb1c commit db9459a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/style.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| Minify Styles
|--------------------------------------------------------------------------
|
| This option determines wetther the compiled css string should be stored
| This option determines wether the compiled css string should be stored
| minified. It is highly recommended to do so. However you are free to
| disable minifying your styles.
|
Expand Down
9 changes: 6 additions & 3 deletions src/Compiler/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ public function __construct(MinifierEngine $engine, Filesystem $files, $cachePat
public function compile($path)
{
// Minify compiled css.
$css = $this->engine->minify(
$this->compileString($this->getRaw($path))
);

$css = $this->compileString($this->getRaw($path));

if (config('style.minify')) {
$css = $this->engine->minify($css);
}

$this->files->put(
$this->getCompiledPath($path),
Expand Down

0 comments on commit db9459a

Please # to comment.