Compressor icon indicating copy to clipboard operation
Compressor copied to clipboard

Environment variables

Open sjadema opened this issue 11 years ago • 4 comments

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!

sjadema avatar Mar 27 '14 04:03 sjadema

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!

sjadema avatar Mar 27 '14 14:03 sjadema

Hey man, i've already coded the above improvements. Give me a shout when u want my ComrpessorService.php

sjadema avatar Mar 27 '14 15:03 sjadema

Thanks, can you just do a pull request?

sathoro avatar Mar 28 '14 01:03 sathoro

Can this issue be closed?

auralon avatar Nov 23 '15 09:11 auralon