Skip to content

Commit

Permalink
Merge branch '2.4' into 2.5
Browse files Browse the repository at this point in the history
* 2.4:
  [#4249] Tiny tweak to language
  update uglifyjs.rst
  Update uglifyjs.rst
  Update uglifyjs.rst
  provide node path on configuration
  • Loading branch information
weaverryan committed Sep 18, 2014
2 parents 73d44d1 + 4485637 commit 90c2cc1
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions cookbook/assetic/uglifyjs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,46 @@ your JavaScripts:

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

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

Assetic tries to find the node binary automatically. If it cannot be found, you
can configure its location using the ``node`` key:

.. configuration-block::

.. code-block:: yaml
# app/config/config.yml
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" >
<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 90c2cc1

Please sign in to comment.