@@ -9,8 +9,8 @@ as you'll see here, files that have a specific extension. To show you how
9
9
to handle each option, let's suppose that you want to use Assetic's CoffeeScript
10
10
filter, which compiles CoffeeScript files into Javascript.
11
11
12
- The main configuration is just the paths to coffee and node. These default
13
- respectively to `` /usr/bin/coffee `` and `` /usr/bin/node `` :
12
+ The main configuration is just the paths to coffee, node and node_modules.
13
+ An example configuration might look like this :
14
14
15
15
.. configuration-block ::
16
16
@@ -22,15 +22,18 @@ respectively to ``/usr/bin/coffee`` and ``/usr/bin/node``:
22
22
coffee :
23
23
bin : /usr/bin/coffee
24
24
node : /usr/bin/node
25
+ node_paths : [ /usr/lib/node_modules/ ]
25
26
26
27
.. code-block :: xml
27
28
28
29
<!-- app/config/config.xml -->
29
30
<assetic : config >
30
- <assetic : filter
31
+ <assetic : filter
31
32
name =" coffee"
32
- bin =" /usr/bin/coffee"
33
- node =" /usr/bin/node" />
33
+ bin =" /usr/bin/coffee/"
34
+ node =" /usr/bin/node/" >
35
+ <assetic : node-paths >/usr/lib/node_modules/</assetic : node-path >
36
+ </assetic : filter >
34
37
</assetic : config >
35
38
36
39
.. code-block :: php
@@ -41,6 +44,7 @@ respectively to ``/usr/bin/coffee`` and ``/usr/bin/node``:
41
44
'coffee' => array(
42
45
'bin' => '/usr/bin/coffee',
43
46
'node' => '/usr/bin/node',
47
+ 'node_paths' => array('/usr/lib/node_modules/'),
44
48
),
45
49
),
46
50
));
@@ -128,6 +132,7 @@ applied to all ``.coffee`` files:
128
132
coffee :
129
133
bin : /usr/bin/coffee
130
134
node : /usr/bin/node
135
+ node_paths : [ /usr/lib/node_modules/ ]
131
136
apply_to : " \. coffee$"
132
137
133
138
.. code-block :: xml
@@ -139,8 +144,9 @@ applied to all ``.coffee`` files:
139
144
bin =" /usr/bin/coffee"
140
145
node =" /usr/bin/node"
141
146
apply_to =" \.coffee$" />
147
+ <assetic : node-paths >/usr/lib/node_modules/</assetic : node-path >
142
148
</assetic : config >
143
-
149
+
144
150
.. code-block :: php
145
151
146
152
// app/config/config.php
@@ -149,6 +155,7 @@ applied to all ``.coffee`` files:
149
155
'coffee' => array(
150
156
'bin' => '/usr/bin/coffee',
151
157
'node' => '/usr/bin/node',
158
+ 'node_paths' => array('/usr/lib/node_modules/'),
152
159
'apply_to' => '\.coffee$',
153
160
),
154
161
),
0 commit comments