Skip to content

Commit ab3dbef

Browse files
committed
update uglifyjs.rst
1 parent 1a5c0a6 commit ab3dbef

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

cookbook/assetic/uglifyjs.rst

Lines changed: 16 additions & 4 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy