Skip to content

Commit aa4c827

Browse files
desarrolla2daFish
authored and
daFish
committed
update uglifyjs.rst
1 parent 48b3194 commit aa4c827

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

cookbook/assetic/uglifyjs.rst

+16-4
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,11 @@ your JavaScripts:
111111

112112
You now have access to the ``uglifyjs2`` filter in your application.
113113

114-
Configure the ``node binary``
115-
----------------------------------
114+
Configure the ``node`` Binary
115+
-----------------------------
116116

117-
he name of the binary is node you can skip this section.
117+
Assetic tries to find the node binary automatically. If it cannot be found, you'll
118+
be able to configure its location using the ``node`` key:
118119

119120
.. configuration-block::
120121

@@ -124,19 +125,30 @@ he name of the binary is node you can skip this section.
124125
assetic:
125126
# the path to the node executable
126127
node: /usr/bin/nodejs
128+
filters:
129+
uglifyjs2:
130+
# the path to the uglifyjs executable
131+
bin: /usr/local/bin/uglifyjs
127132
128133
.. code-block:: xml
129134
130135
<!-- app/config/config.xml -->
131136
<assetic:config
132-
node="/usr/bin/nodejs">
137+
node="/usr/bin/nodejs" >
138+
<assetic:filter
139+
name="uglifyjs2"
140+
bin="/usr/local/bin/uglifyjs" />
133141
</assetic:config>
134142
135143
.. code-block:: php
136144
137145
// app/config/config.php
138146
$container->loadFromExtension('assetic', array(
139147
'node' => '/usr/bin/nodejs',
148+
'uglifyjs2' => array(
149+
// the path to the uglifyjs executable
150+
'bin' => '/usr/local/bin/uglifyjs',
151+
),
140152
));
141153
142154
Minify your Assets

0 commit comments

Comments
 (0)