Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Jsmin and Cssmin not generate minified file !

Someone managed to use the filters minification of javascript and stylesheets (\Phalcon\Assets\Filters\Jsmin and \Phalcon\Assets\Filters\Cssmin)?

I tried numerous times, recompile the Phalcon, according to the tips on this topic this:

->addFilter(new Phalcon\Assets\Filters\Jsmin());

I can not generate the final file with all the minified content, neither filters seems to work!

Use the Phalcon 1.3.4! Anyone have any tips?

Thanks !


I see in the docs that you forgotted to add ->join(true) before the filters (maybe?) ( ).

edited Jan '15

Indeed, unfortunately ->join (true) does not work even so! also does not throw any exception !


Maybe adding the files after setting the paths...

edited Jan '15

RompePC, I really appreciate your help, but the error was totally mine, to generate my final file, i forgot to define which collection should be set! For example:

$this->assets->outputJs (); // Not generate final file
$this->assets->outputJs ('my_collection_name'); // Generate correctly

Thanks !



Mark your answer as an accepted answer then.