Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitab3dbef

Browse files
committed
update uglifyjs.rst
1 parent1a5c0a6 commitab3dbef

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

‎cookbook/assetic/uglifyjs.rst‎

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,11 @@ your JavaScripts:
111111

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

114-
Configure the ``node binary``
115-
----------------------------------
114+
Configure the ``node`` Binary
115+
-----------------------------
116116

117-
he name of the binary is node you can skip this section.
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:
118119

119120
..configuration-block::
120121

@@ -124,19 +125,30 @@ he name of the binary is node you can skip this section.
124125
assetic:
125126
# the path to the node executable
126127
node:/usr/bin/nodejs
128+
filters:
129+
uglifyjs2:
130+
# the path to the uglifyjs executable
131+
bin:/usr/local/bin/uglifyjs
127132
128133
..code-block::xml
129134
130135
<!-- app/config/config.xml-->
131136
<assetic:config
132-
node="/usr/bin/nodejs">
137+
node="/usr/bin/nodejs" >
138+
<assetic:filter
139+
name="uglifyjs2"
140+
bin="/usr/local/bin/uglifyjs" />
133141
</assetic:config>
134142
135143
..code-block::php
136144
137145
// app/config/config.php
138146
$container->loadFromExtension('assetic', array(
139147
'node' => '/usr/bin/nodejs',
148+
'uglifyjs2' => array(
149+
// the path to the uglifyjs executable
150+
'bin' => '/usr/local/bin/uglifyjs',
151+
),
140152
));
141153
142154
Minify your Assets

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp