Skip to content

Commit

Permalink
update uglifyjs.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
desarrolla2 committed Sep 18, 2014
1 parent 1a5c0a6 commit ab3dbef
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions cookbook/assetic/uglifyjs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ your JavaScripts:

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

Configure the ``node binary``
----------------------------------
Configure the ``node`` Binary
-----------------------------

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

.. configuration-block::

Expand All @@ -124,19 +125,30 @@ he name of the binary is node you can skip this section.
assetic:
# the path to the node executable
node: /usr/bin/nodejs
filters:
uglifyjs2:
# the path to the uglifyjs executable
bin: /usr/local/bin/uglifyjs
.. code-block:: xml
<!-- app/config/config.xml -->
<assetic:config
node="/usr/bin/nodejs">
node="/usr/bin/nodejs" >
<assetic:filter
name="uglifyjs2"
bin="/usr/local/bin/uglifyjs" />
</assetic:config>
.. code-block:: php
// app/config/config.php
$container->loadFromExtension('assetic', array(
'node' => '/usr/bin/nodejs',
'uglifyjs2' => array(
// the path to the uglifyjs executable
'bin' => '/usr/local/bin/uglifyjs',
),
));
Minify your Assets
Expand Down

0 comments on commit ab3dbef

Please sign in to comment.