Skip to content
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
neilime committed Oct 17, 2016
2 parents d371067 + 26f8917 commit 8939a3a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected function getCSSmin() {
if (!class_exists('CSSmin')) {
throw new \LogicException('"CSSmin" class does not exist');
}
return $this->cssMin = new \CSSmin();
return $this->cssMin = new \CSSmin(false);
}

}
26 changes: 13 additions & 13 deletions src/AssetsBundle/Service/ToolsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ public function renderAllAssets()
//Start process
$oConsole = $this->getConsole();
$oConsole->writeLine('');
$oConsole->writeLine('======================================================================', \Zend\Console\ColorInterface::GRAY);
$oConsole->writeLine('======================================================================', \Zend\Console\ColorInterface::WHITE);
$oConsole->writeLine('Render all assets for ' . ($oAssetsBundleService->getOptions()->isProduction() ? 'production' : 'development'), \Zend\Console\ColorInterface::GREEN);
$oConsole->writeLine('======================================================================', \Zend\Console\ColorInterface::GRAY);
$oConsole->writeLine('======================================================================', \Zend\Console\ColorInterface::WHITE);
$oConsole->writeLine('');

//Empty cache directory
$this->emptyCache();

$oConsole->writeLine('');
$oConsole->writeLine('Start rendering assets : ', \Zend\Console\ColorInterface::GREEN);
$oConsole->writeLine('-------------------------', \Zend\Console\ColorInterface::GRAY);
$oConsole->writeLine('-------------------------', \Zend\Console\ColorInterface::WHITE);
$oConsole->writeLine('');
$aUnwantedKeys = array(
\AssetsBundle\AssetFile\AssetFile::ASSET_CSS => true,
Expand All @@ -70,7 +70,7 @@ public function renderAllAssets()

//If module has global assets
if (array_intersect_key($aModuleConfig, $aUnwantedKeys)) {
$oConsole->write(' * ', \Zend\Console\ColorInterface::GRAY);
$oConsole->write(' * ', \Zend\Console\ColorInterface::WHITE);
$oConsole->write('[' . $sModuleName . ']', \Zend\Console\ColorInterface::LIGHT_CYAN);
$oConsole->write('[No controller]', \Zend\Console\ColorInterface::LIGHT_BLUE);
$oConsole->write('[No action]' . PHP_EOL, \Zend\Console\ColorInterface::LIGHT_WHITE);
Expand All @@ -87,7 +87,7 @@ public function renderAllAssets()

//If controller has global assets
if (array_intersect_key($aControllerConfig, $aUnwantedKeys)) {
$oConsole->write(' * ', \Zend\Console\ColorInterface::GRAY);
$oConsole->write(' * ', \Zend\Console\ColorInterface::WHITE);
$oConsole->write('[' . $sModuleName . ']', \Zend\Console\ColorInterface::LIGHT_CYAN);
$oConsole->write('[' . $sControllerName . ']', \Zend\Console\ColorInterface::LIGHT_BLUE);
$oConsole->write('[No action]' . PHP_EOL, \Zend\Console\ColorInterface::LIGHT_WHITE);
Expand All @@ -100,7 +100,7 @@ public function renderAllAssets()
foreach (array_diff_key($aAssetsConfiguration[$sModuleName][$sControllerName], $aUnwantedKeys) as $sActionName => $aActionConfig) {
//Render assets for action
if (array_intersect_key($aActionConfig, $aUnwantedKeys)) {
$oConsole->write(' * ', \Zend\Console\ColorInterface::GRAY);
$oConsole->write(' * ', \Zend\Console\ColorInterface::WHITE);
$oConsole->write('[' . $sModuleName . ']', \Zend\Console\ColorInterface::LIGHT_CYAN);
$oConsole->write('[' . $sControllerName . ']', \Zend\Console\ColorInterface::LIGHT_BLUE);
$oConsole->write('[' . $sActionName . ']' . PHP_EOL, \Zend\Console\ColorInterface::LIGHT_WHITE);
Expand All @@ -112,7 +112,7 @@ public function renderAllAssets()
}
}
//Render global assets
$oConsole->write(' * ', \Zend\Console\ColorInterface::GRAY);
$oConsole->write(' * ', \Zend\Console\ColorInterface::WHITE);
$oConsole->write('[No module]', \Zend\Console\ColorInterface::LIGHT_CYAN);
$oConsole->write('[No controller]', \Zend\Console\ColorInterface::LIGHT_BLUE);
$oConsole->write('[No action]' . PHP_EOL, \Zend\Console\ColorInterface::LIGHT_WHITE);
Expand All @@ -123,7 +123,7 @@ public function renderAllAssets()
$oAssetsBundleService->renderAssets($oMvcEvent);

$oConsole->writeLine('');
$oConsole->writeLine('---------------', \Zend\Console\ColorInterface::GRAY);
$oConsole->writeLine('---------------', \Zend\Console\ColorInterface::WHITE);
$oConsole->writeLine('Assets rendered', \Zend\Console\ColorInterface::GREEN);
$oConsole->writeLine('');

Expand All @@ -139,9 +139,9 @@ public function emptyCache($bDisplayConsoleMessage = true)
if ($bDisplayConsoleMessage) {
$oConsole = $this->getConsole();
$oConsole->writeLine('');
$oConsole->writeLine('========================', \Zend\Console\ColorInterface::GRAY);
$oConsole->writeLine('========================', \Zend\Console\ColorInterface::WHITE);
$oConsole->writeLine('Empty cache', \Zend\Console\ColorInterface::GREEN);
$oConsole->writeLine('========================', \Zend\Console\ColorInterface::GRAY);
$oConsole->writeLine('========================', \Zend\Console\ColorInterface::WHITE);
$oConsole->writeLine('');
}

Expand All @@ -160,7 +160,7 @@ public function emptyCache($bDisplayConsoleMessage = true)
}
}
if ($bDisplayConsoleMessage) {
$oConsole->writeLine(' * Cache directory is empty', \Zend\Console\ColorInterface::GRAY);
$oConsole->writeLine(' * Cache directory is empty', \Zend\Console\ColorInterface::WHITE);
}

// Retrieve Asset File Filters Manager
Expand All @@ -180,7 +180,7 @@ public function emptyCache($bDisplayConsoleMessage = true)
}
}
if ($bDisplayConsoleMessage) {
$oConsole->writeLine(' * "' . $oFilter->getAssetFileFilterName() . '" filter cache directory is empty', \Zend\Console\ColorInterface::GRAY);
$oConsole->writeLine(' * "' . $oFilter->getAssetFileFilterName() . '" filter cache directory is empty', \Zend\Console\ColorInterface::WHITE);
}
}
}
Expand All @@ -196,7 +196,7 @@ public function emptyCache($bDisplayConsoleMessage = true)
}
}
if ($bDisplayConsoleMessage) {
$oConsole->writeLine(' * Config cache directory is empty', \Zend\Console\ColorInterface::GRAY);
$oConsole->writeLine(' * Config cache directory is empty', \Zend\Console\ColorInterface::WHITE);
$oConsole->writeLine('');
}

Expand Down

0 comments on commit 8939a3a

Please sign in to comment.