/** * Generate assets */ protected function _generateAssets() { if (!file_exists(CSS . 'croogo-bootstrap.css')) { App::uses('AssetGenerator', 'Install.Lib'); $generator = new AssetGenerator(); try { $generator->generate(); } catch (Exception $e) { $this->log($e->getMessage()); $this->Session->setFlash('Asset generation failed. Please verify that dependencies exists and readable.', 'default', array('class' => 'error')); } } }
/** * Generate assets */ protected function _generateAssets() { $file = CakePlugin::path('Croogo') . 'webroot' . DS . 'css' . DS . 'croogo-bootstrap.css'; if (!file_exists($file)) { App::uses('AssetGenerator', 'Install.Lib'); $generator = new AssetGenerator(); try { $generator->generate(); } catch (Exception $e) { $this->log($e->getMessage()); $this->Session->setFlash('Asset generation failed. Please verify that dependencies exists and readable.', 'flash', array('class' => 'error')); } } }
/** * Compile assets for admin ui */ public function make() { App::uses('AssetGenerator', 'Install.Lib'); if (!CakePlugin::loaded('Install')) { CakePlugin::load('Install'); } $generator = new AssetGenerator(); try { $generator->generate(array('clone' => true)); } catch (Exception $e) { $this->err('<error>' . $e->getMessage() . '</error>'); } CakePlugin::unload('Install'); }
/** * Execute the console command. * * @return mixed */ public function fire() { $css_file = $this->argument('css-file'); $this->generator->generateImagesFromFile($css_file); }