/** * @return string */ public function getFile() { // No point in storing in cache since no parsing is done $contents = Utilities::getFile($this->file['path']); // fix absolute paths $contents = str_replace(array('../'), str_replace(ROOT, "", dirname($this->file['path'])) . '/../', $contents); return $contents; }
/** * @return string */ public function getFile() { // get file contents $file_contents = Utilities::getFile($this->file['path']); // Create scss parser $scss = new Compiler(); // set load path for imported files $scss->setImportPaths(dirname($this->file['path'])); // Parse file using direct file path $contents = $scss->compile($file_contents); // fix absolute file paths $contents = str_replace(array('../'), str_replace(ROOT, "", dirname($this->file['path'])) . '/../', $contents); // get parsed files and store in cache $this->cache->save($this->file['hash'] . "parsed_files", $scss->getParsedFiles()); // return css return $contents; }
/** * @return string */ public function getFile() { // No point in caching js files since no parsing is done return Utilities::getFile($this->file['path']); }