YoungJules

No minify

Oct 9th, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1.     /**
  2.      * Minify a javascript-file
  3.      *
  4.      * @param string $file The file to be minified.
  5.      * @return string
  6.      */
  7.     private function minifyJS($file)
  8.     {
  9.         $finalURL = $file;
  10.         return $finalURL;      
  11.         // create unique filename
  12. //      $fileName = md5($file) . '.js';
  13. //      $finalURL = FRONTEND_CACHE_URL . '/minified_js/' . $fileName;
  14. //      $finalPath = FRONTEND_CACHE_PATH . '/minified_js/' . $fileName;
  15.  
  16.         // check that file does not yet exist or has been updated already
  17. //      if(!SpoonFile::exists($finalPath) || filemtime(PATH_WWW . $file) > filemtime($finalPath))
  18. //      {
  19.             // create directory if it does not exist
  20. //          if(!SpoonDirectory::exists(dirname($finalPath)))
  21. //          {
  22. //              SpoonDirectory::create(dirname($finalPath));
  23. //          }
  24.  
  25.             // minify the file
  26. //          require_once PATH_LIBRARY . '/external/minify.php';
  27. //          $js = new MinifyJS(PATH_WWW . $file);
  28. //          $js->minify($finalPath);
  29. //      }
  30.  
  31. //      return $finalURL;
  32.     }
Advertisement
Add Comment
Please, Sign In to add comment