0
votes

I am doing a project in Symfony2 and I have a problem with assetics. I use to compress assetics yuicompressor but the command:

app/console assetic:dump --force --watch

does not work i get always this error after some time:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32 bytes) in /Applications/MAMP/htdocs/optinet/vendor/twig/lib/Twig/Node.php on line 225

I've tried all the ways but not working always get the error.

thanks.

1
i tried sudo php -d memory_limit=600M app/console assetic:dump --force --watch but no working - Bicu
whithout --watch work but i want with watch for when i edit code update asstics automatically. thanks. - Bicu

1 Answers

2
votes

In order to work around assetic in general with assetic:dump --watch like commands dig into Guard or Grunt ! I moved there because of similar performance problems and lacking configuration options in assetic.

The watch command has the downside of only being able to run with debug option.

Grunt/Guard aka. task watchers are able to automatically re-dump assets, run unit-tests and livereload your browser on changes to controllers or assets.

They even provide nice integration for GROWL (OSX / Windows) and libnotify ( *nix ) notifications for completed/failed tasks.

Use one of these in combination with CoffeeScript,SASS,LESS, ... source-maps for maximum frontend productivy.

If you use Chrome and Tincr with assets:install web --symlink you can even edit/debug your css and js directly in DevTools and save them back into your current bundle structure without leaving the browser.

Firefox has recently added source-map support in Aurora.

Assetic currently lacks the source-map options needed for various pre-processors but i'm working on that already ;-)