Skip to content

Commit

Permalink
feature #4249 provide node path on configuration (desarrolla2)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

provide node path on configuration

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs? | No
| Applies to    | all
| Fixed tickets |

If you no provide node path in assetic configuration, UglifyCssFilter throw a  `RuntimeException: Path to node executable could not be resolved.`

Commits
-------

ab3dbef update uglifyjs.rst
1a5c0a6 Update uglifyjs.rst
1621071 Update uglifyjs.rst
2258ac9 provide node path on configuration
  • Loading branch information
weaverryan committed Sep 18, 2014
2 parents 2319d6a + ab3dbef commit c306b68
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'll
be able to 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 c306b68

Please sign in to comment.