From ab3dbef14ebe236e6784e16d8e35f2db227c6812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cervi=C3=B1o?= Date: Thu, 18 Sep 2014 16:08:38 +0200 Subject: [PATCH] update uglifyjs.rst --- cookbook/assetic/uglifyjs.rst | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/cookbook/assetic/uglifyjs.rst b/cookbook/assetic/uglifyjs.rst index b100a4e0029..5bf1b2cf996 100644 --- a/cookbook/assetic/uglifyjs.rst +++ b/cookbook/assetic/uglifyjs.rst @@ -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:: @@ -124,12 +125,19 @@ 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 + node="/usr/bin/nodejs" > + .. code-block:: php @@ -137,6 +145,10 @@ he name of the binary is node you can skip this section. // 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