qbbr.io / blog

Source: markdown

install (node.js + npm required):

$ sudo npm install -g coffee-script

configure:

add coffee filter to assetic configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# app/config/config.yml
# ...
# Assetic Configuration
assetic:
    debug:          %kernel.debug%
    use_controller: false
    filters:
        cssrewrite: ~
        coffee:
            node: /usr/bin/node
            bin: /usr/bin/coffee

using:

twig:

1
2
3
4
5
6
{% javascripts filter='coffee'
    '@QcmsAdminBundle/Resources/public/coffee/menu.coffee'
    '@QcmsAdminBundle/Resources/public/coffee/ui-tabs.coffee'
%}
    <script src="{{ asset_url }}"></script>
{% endjavascripts %}
comments powered by Disqus
On your computer does not found Web Browser!
Plz install it.
Firefox
Chromium
Google Chrome
Safari
Opera