Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Minify a javascript-file
- *
- * @param string $file The file to be minified.
- * @return string
- */
- private function minifyJS($file)
- {
- $finalURL = $file;
- return $finalURL;
- // create unique filename
- // $fileName = md5($file) . '.js';
- // $finalURL = FRONTEND_CACHE_URL . '/minified_js/' . $fileName;
- // $finalPath = FRONTEND_CACHE_PATH . '/minified_js/' . $fileName;
- // check that file does not yet exist or has been updated already
- // if(!SpoonFile::exists($finalPath) || filemtime(PATH_WWW . $file) > filemtime($finalPath))
- // {
- // create directory if it does not exist
- // if(!SpoonDirectory::exists(dirname($finalPath)))
- // {
- // SpoonDirectory::create(dirname($finalPath));
- // }
- // minify the file
- // require_once PATH_LIBRARY . '/external/minify.php';
- // $js = new MinifyJS(PATH_WWW . $file);
- // $js->minify($finalPath);
- // }
- // return $finalURL;
- }
Advertisement
Add Comment
Please, Sign In to add comment