Is there any way to tell the Assetic command-line file to not generate the composite "output" file when it builds for the dev environment?
We have it running with the --watch configuration. We have composite files which take a long time to generate and aren't used, so it's a serious waste of time. It also causes it to regenerate all files in that stack, instead of the one single one that changes.
Any ideas? If there isn't, I'm half-tempted to override the asset:dump command myself because we're seriously wasting 1-3 minutes every time we make a tiny file change. =(
Symfony version: 2.2.0 (according to debug bar, just ran Composer update with no changes)
config.yml (assetic block)
assetic:
debug: %kernel.debug%
use_controller: false
#bundles: []
#java: /usr/bin/java
filters:
cssrewrite: ~
less:
node: /usr/bin/node
node_paths: [/usr/local/lib/node_modules,/usr/lib/node_modules]
apply_to: "\.less"
typescript:
resource: %kernel.root_dir%/../src/GamePlan/Bundle/CoreBundle/Resources/config/assetic.typescript.xml
apply_to: "\.ts"
tsc: /usr/local/bin/tsc
node: /usr/bin/node
useOut: false
(Custom TypeScriptFilter, but it is happening to CSS files as well, so it shouldn't be that which is causing it... it's also a relatively minor tweak to the one in the official repo.)
config_dev.yml (assetic block)
assetic:
use_controller: false
Example usage:
{% stylesheets output="bundles/mybundle/styles/mystyle.css"
filter="cssrewrite"
"@MyBundle/Resources/styles/a.less"
"@MyBundle/Resources/styles/b.less"
"@MyBundle/Resources/styles/subfolder/*.less"
"@MyBundle/Resources/styles/subfolder/*/*.less"
%}
<link type="text/css" rel="stylesheet" href="{{ asset_url }}"/>
{% endstylesheets %}
Running command (from /var/www as www-data):
php Symfony/app/console assetic:dump --env=dev [--watch]
With or without --watch doesn't change what files are generated, just if it does them all or just watches.
Note sure if this will give anyone a clue as to what is going on, but it tries to generate the composite file before it generates the individual dev ones.
I've also ensured I'm not duplicating any includes, referencing any composite files in other blocks, etc.
It isn't loading the composite files in the HTML, but I can see them generated from the command.
If any more info is needed, please let me know. Thanks.