From a3a544a344dd1aab754bff856e7df5947dee2375 Mon Sep 17 00:00:00 2001 From: Dilip Date: Fri, 24 Jan 2014 02:13:40 +0530 Subject: [PATCH] Updated doc about using jar files from other location Updated doc about using jar files such as compiler.jar and yuicompressor.jar from other location then the default specified. --- docs/guide/assets.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/guide/assets.md b/docs/guide/assets.md index 8a9b499e4b6..6329484ae3f 100644 --- a/docs/guide/assets.md +++ b/docs/guide/assets.md @@ -195,6 +195,18 @@ named `yuicompressor.jar`. In order to compress resources with these two you need to download both and place where your `yii` console bootstrap file is using named mentioned above. Since both are Java tools you need JRE installed. +If you want to place this two jar file at other location, then you need to redefine `cssCompressor` and `jsCompressor` properties in above config.php file. +```php +return [ + ... + 'cssCompressor' => 'java -jar path.to.file\yuicompressor.jar --type css {from} {to}', + 'jsCompressor' => 'java -jar path.to.file\compiler.jar --js {from} --js_output_file {to}', + ... +]; +``` +path.to.file can be `D:\xyz\compressor\` for Windows and `/bin/compressor/` for unix and other. + + ### Performing compression After configuration is adjusted you can run the `compress` action, using created config: