public function addAssets($files) { foreach ((array) $files as $file) { $ext = pathinfo($file, PATHINFO_EXTENSION); switch ($ext) { case 'js': $this->view->getJs()->addFile($file); break; case 'css': case 'less': $this->view->getCss()->addFile($file); break; } } }
/** * @param WebAppView $view */ private function addDefaultAssets(WebAppView $view) { $root = __DIR__ . '/../../..'; $name = $this->getName(); $view->getJs()->addFile("{$root}/js/{$name}/dist/app.js"); $view->getCss()->addFile("{$root}/less/{$name}/app.less"); }