kriswallsmith/assetic — Issue #147: missing output file, unnecessary combining
Author: mcz
Created: 2011-10-29 23:34:18+00:00
State: open

Hi guys,

When I run

```
app/console assetic:dump --env=prod --no-debug
```

The output files (all.js, all.css) won't be dumped to web/js and web/css dir. But interestingly when I open my app in the browser in dev mode (/app_dev.php/) and rerun the command above, the output files (all.js, all.css) will be dumped correctly.

Another problem is that assetic places the fuzzy hash names (/js/6bfb7ac.js, /css/9118a5a.css) of the assets in my Twig templates instead of the output file names (all.js, all.css).

Third problem is, when I run my app in debug mode, files get combined into one file, which is unneeded in dev environment. So in the rendered HTML for app_dev.php I get these tow files:

```html

```

... instead of multiple files. Am I doing something wrong? Or these are really bugs?

Thank you in advance.

Here is my config.yml

```
assetic:
debug: %kernel.debug%
# write_to: "%kernel.root_dir%/../web"
use_controller: false

filters:
yui_css:
jar: %kernel.root_dir%/Resources/yui/yuicompressor-2.4.6.jar
yui_js:
jar: %kernel.root_dir%/Resources/yui/yuicompressor-2.4.6.jar
coffee:
bin: /usr/local/bin/coffee
node: /usr/local/bin/node
apply_to: "\.coffee$"
less:
node: /usr/local/bin/node
node_paths: [/usr/local/lib/node_modules]
apply_to: "\.less$"
cssrewrite: ~

assets:
all_css:
inputs:
- @KozossegepitoBundle/Resources/public/css/bootstrap/bootstrap.less
- @KozossegepitoBundle/Resources/public/css/app.less
output: css/all.css
filters: [less, ?yui_css]

bootstrap:
inputs:
- @KozossegepitoBundle/Resources/public/js/bootstrap/bootstrap-modal.js
- @KozossegepitoBundle/Resources/public/js/bootstrap/bootstrap-twipsy.js

app_js:
inputs:
- @KozossegepitoBundle/Resources/public/js/forgot.coffee
filters: [coffee]

all_js:
inputs:
- @bootstrap
- @app_js
filters: [?yui_js]
output: js/all.js
```

Here is how I render the assets:

```
{% javascripts '@all_js' %}

{% endjavascripts %}

{% stylesheets '@all_css' %}

{% endstylesheets %}
```