Compressor
Compressor copied to clipboard
Environment variables
Hey man,
awesome plugin. Works pretty good. Few issues; document_root should not use $_SERVER[document_root], this breaks when you're setting up multiple environments (dev, staging, production). We need to find a clever way to find out the webroot and build the path and url from there. The filesize check to determine the compressor should be the same as in Minify_JS_ClosureCompiler to avoid problems. Do not output the links to twig, instead make css() and js() methods void and give the makeCacheUrl() result to craft()->templates->includeJsFile() and craft()->templates->includeCssFile(). Then the output of those html tags will be handled within Craft itself.
Keep up the good work!
The above issue with the document_root can be fixed with Craft::getPathOfAlias('webroot'). Since this is a core Yii alias it won't get changed any time soon and is safe to use!
Hey man, i've already coded the above improvements. Give me a shout when u want my ComrpessorService.php
Thanks, can you just do a pull request?
Can this issue be closed?