Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c306b68

Browse filesBrowse files
committed
feature #4249 provide node path on configuration (desarrolla2)
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
2 parents 2319d6a + ab3dbef commit c306b68
Copy full SHA for c306b68

File tree

Expand file treeCollapse file tree

1 file changed

+40
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+40
-0
lines changed

‎cookbook/assetic/uglifyjs.rst

Copy file name to clipboardExpand all lines: cookbook/assetic/uglifyjs.rst
+40Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,46 @@ your JavaScripts:
111111

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

114+
Configure the ``node`` Binary
115+
-----------------------------
116+
117+
Assetic tries to find the node binary automatically. If it cannot be found, you'll
118+
be able to configure its location using the ``node`` key:
119+
120+
.. configuration-block::
121+
122+
.. code-block:: yaml
123+
124+
# app/config/config.yml
125+
assetic:
126+
# the path to the node executable
127+
node: /usr/bin/nodejs
128+
filters:
129+
uglifyjs2:
130+
# the path to the uglifyjs executable
131+
bin: /usr/local/bin/uglifyjs
132+
133+
.. code-block:: xml
134+
135+
<!-- app/config/config.xml -->
136+
<assetic:config
137+
node="/usr/bin/nodejs" >
138+
<assetic:filter
139+
name="uglifyjs2"
140+
bin="/usr/local/bin/uglifyjs" />
141+
</assetic:config>
142+
143+
.. code-block:: php
144+
145+
// app/config/config.php
146+
$container->loadFromExtension('assetic', array(
147+
'node' => '/usr/bin/nodejs',
148+
'uglifyjs2' => array(
149+
// the path to the uglifyjs executable
150+
'bin' => '/usr/local/bin/uglifyjs',
151+
),
152+
));
153+
114154
Minify your Assets
115155
------------------
116156

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.