/** * Generate the build files for css and scripts. * * @return void */ protected function _buildFiles() { if (!empty($this->_buildFiles['css'])) { $Css = new CssFile(); foreach ($this->_buildFiles['css'] as $target => $contents) { if (strpos($target, ':hash') === 0) { $target = md5(implode('_', $contents)); } $this->out('Saving CSS file for ' . $target); $compress = $Css->process($contents); $Css->cache($target . '.css', $compress); } } if (!empty($this->_buildFiles['script'])) { $Js = new JsFile(); foreach ($this->_buildFiles['script'] as $target => $contents) { if (strpos($target, ':hash') === 0) { $target = md5(implode('_', $contents)); } $this->out('Saving Javascript file for ' . $target); $compress = $Js->process($contents); $Js->cache($target . '.js', $compress); } } }