Friday, July 10, 2015

Making AssetCompress Work With Friendsofcake/App-Template

Hello, folks.

Back story: I came across Mark's AssetCompress plugin through the FriendsOfCake website, and I've been using it with my 2.x projects, before I started using the app-template, and it works nicely.

Fast-forward: I have a new project that uses friendsofcake/app-template for 2.5, and I tried to install AssetCompress using Composer. The `AssetCompress build_ini` shell command works OK (which would be used to generate static assets for production), but `AssetCompress clear` gives the following error:

Error: DirectoryIterator::__construct(/private/var/www/myproject/vendor/cakephp/cakephp/lib/Cake/Console/Templates/skel/tmp/cache/asset_compress/): failed to open dir: No such file or directory
#0 /private/var/www/myproject/Plugin/AssetCompress/Console/Command/AssetCompressShell.php(135): DirectoryIterator->__construct('/private/var/ww...')
#1 /private/var/www/myproject/Plugin/AssetCompress/Console/Command/AssetCompressShell.php(116): AssetCompressShell->_clearPath('/private/var/ww...', Array, Array)
#2 /private/var/www/myproject/Plugin/AssetCompress/Console/Command/AssetCompressShell.php(74): AssetCompressShell->_clearBuilds('css')
#3 /private/var/www/myproject/vendor/cakephp/cakephp/lib/Cake/Console/Shell.php(437): AssetCompressShell->clear()
#4 /private/var/www/myproject/vendor/cakephp/cakephp/lib/Cake/Console/ShellDispatcher.php(209): Shell->runCommand('clear', Array)
#5 /private/var/www/myproject/vendor/cakephp/cakephp/lib/Cake/Console/ShellDispatcher.php(66): ShellDispatcher->dispatch()
#6 /private/var/www/myproject/app/Console/cake.php(37): ShellDispatcher::run(Array)
#7 {main}

I'm using version 0.19 for AssetCompress.

My questions would be:

* Do I need to fix this? If yes, how?
* If I don't need to fix this, how does it affect the asset build process when I call build_ini without clearing the asset cache output directories? Does it have unwanted side effects, especially if the timestamp option would be turned on?

TIA,
OJ

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: