@@ -60,7 +60,7 @@ templates:
60
60
.. code-block :: html+jinja
61
61
62
62
{% javascripts '@AppBundle/Resources/public/js/example.coffee' filter='coffee' %}
63
- <script src="{{ asset_url }}" type="text/javascript" ></script>
63
+ <script src="{{ asset_url }}"></script>
64
64
{% endjavascripts %}
65
65
66
66
.. code-block :: html+php
@@ -69,7 +69,7 @@ templates:
69
69
array('@AppBundle/Resources/public/js/example.coffee'),
70
70
array('coffee')
71
71
) as $url): ?>
72
- <script src="<?php echo $view->escape($url) ?>" type="text/javascript" ></script>
72
+ <script src="<?php echo $view->escape($url) ?>"></script>
73
73
<?php endforeach ?>
74
74
75
75
This is all that's needed to compile this CoffeeScript file and serve it
@@ -87,7 +87,7 @@ You can also combine multiple CoffeeScript files into a single output file:
87
87
{% javascripts '@AppBundle/Resources/public/js/example.coffee'
88
88
'@AppBundle/Resources/public/js/another.coffee'
89
89
filter='coffee' %}
90
- <script src="{{ asset_url }}" type="text/javascript" ></script>
90
+ <script src="{{ asset_url }}"></script>
91
91
{% endjavascripts %}
92
92
93
93
.. code-block :: html+php
@@ -99,7 +99,7 @@ You can also combine multiple CoffeeScript files into a single output file:
99
99
),
100
100
array('coffee')
101
101
) as $url): ?>
102
- <script src="<?php echo $view->escape($url) ?>" type="text/javascript" ></script>
102
+ <script src="<?php echo $view->escape($url) ?>"></script>
103
103
<?php endforeach ?>
104
104
105
105
Both the files will now be served up as a single file compiled into regular
@@ -118,7 +118,7 @@ adding the JavaScript files to the files to be combined as above will not
118
118
work as the regular JavaScript files will not survive the CoffeeScript compilation.
119
119
120
120
This problem can be avoided by using the ``apply_to `` option in the config,
121
- which allows you to specify that a filter should always be applied to particular
121
+ which allows you to specify which filter should always be applied to particular
122
122
file extensions. In this case you can specify that the ``coffee `` filter is
123
123
applied to all ``.coffee `` files:
124
124
@@ -173,7 +173,7 @@ being run through the CoffeeScript filter):
173
173
{% javascripts '@AppBundle/Resources/public/js/example.coffee'
174
174
'@AppBundle/Resources/public/js/another.coffee'
175
175
'@AppBundle/Resources/public/js/regular.js' %}
176
- <script src="{{ asset_url }}" type="text/javascript" ></script>
176
+ <script src="{{ asset_url }}"></script>
177
177
{% endjavascripts %}
178
178
179
179
.. code-block :: html+php
@@ -185,5 +185,5 @@ being run through the CoffeeScript filter):
185
185
'@AppBundle/Resources/public/js/regular.js',
186
186
)
187
187
) as $url): ?>
188
- <script src="<?php echo $view->escape($url) ?>" type="text/javascript" ></script>
188
+ <script src="<?php echo $view->escape($url) ?>"></script>
189
189
<?php endforeach ?>
0 commit comments