From 2258ac992c09a55b4c53c81fed407f74880563a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez?= Date: Thu, 18 Sep 2014 13:42:54 +0200 Subject: [PATCH 1/4] provide node path on configuration If you no provide node path in assetic configuration, UglifyCssFilter throw a `RuntimeException: Path to node executable could not be resolved.` --- cookbook/assetic/uglifyjs.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbook/assetic/uglifyjs.rst b/cookbook/assetic/uglifyjs.rst index 05d378b43d7..7498ea53c23 100644 --- a/cookbook/assetic/uglifyjs.rst +++ b/cookbook/assetic/uglifyjs.rst @@ -66,6 +66,7 @@ your JavaScripts: # app/config/config.yml assetic: + node: /usr/bin/nodejs filters: uglifyjs2: # the path to the uglifyjs executable From 162107176bd5b7e7c80d917d344c287ef95476ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez?= Date: Thu, 18 Sep 2014 15:49:54 +0200 Subject: [PATCH 2/4] Update uglifyjs.rst --- cookbook/assetic/uglifyjs.rst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/cookbook/assetic/uglifyjs.rst b/cookbook/assetic/uglifyjs.rst index 7498ea53c23..431da7f9072 100644 --- a/cookbook/assetic/uglifyjs.rst +++ b/cookbook/assetic/uglifyjs.rst @@ -112,6 +112,34 @@ your JavaScripts: You now have access to the ``uglifyjs2`` filter in your application. +Configure the ``node binary`` +---------------------------------- + +he name of the binary is node you can skip this section. + +.. configuration-block:: + + .. code-block:: yaml + + # app/config/config.yml + assetic: + # the path to the node executable + node: /usr/bin/nodejs + + .. code-block:: xml + + + + + + .. code-block:: php + + // app/config/config.php + $container->loadFromExtension('assetic', array( + 'node' => '/usr/bin/nodejs', + )); + Minify your Assets ------------------ From 1a5c0a619b55c24bef9debe482aeb43e04ef309b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez?= Date: Thu, 18 Sep 2014 15:52:31 +0200 Subject: [PATCH 3/4] Update uglifyjs.rst --- cookbook/assetic/uglifyjs.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/cookbook/assetic/uglifyjs.rst b/cookbook/assetic/uglifyjs.rst index 431da7f9072..b100a4e0029 100644 --- a/cookbook/assetic/uglifyjs.rst +++ b/cookbook/assetic/uglifyjs.rst @@ -66,7 +66,6 @@ your JavaScripts: # app/config/config.yml assetic: - node: /usr/bin/nodejs filters: uglifyjs2: # the path to the uglifyjs executable 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 4/4] 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